From 9d6a5dc26f8519804058549d782cddbb70944ee4 Mon Sep 17 00:00:00 2001 From: Roman Khimov Date: Thu, 18 Feb 2021 17:16:15 +0300 Subject: [PATCH] result: fix confirmations count for blocks It's +1, current block actually had `-1` value calcuated that transformed into 4294967295. --- pkg/rpc/response/result/block.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkg/rpc/response/result/block.go b/pkg/rpc/response/result/block.go index b1cadb605..a074021fb 100644 --- a/pkg/rpc/response/result/block.go +++ b/pkg/rpc/response/result/block.go @@ -48,7 +48,7 @@ func NewBlock(b *block.Block, chain core.Blockchainer) Block { Base: &b.Base, BlockMetadataAndTx: BlockMetadataAndTx{ Size: io.GetVarSize(b), - Confirmations: chain.BlockHeight() - b.Index - 1, + Confirmations: chain.BlockHeight() - b.Index + 1, Tx: make([]Tx, 0, len(b.Transactions)), }, }