Skip to content
Open
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions factory/api/apiResolverFactory.go
Original file line number Diff line number Diff line change
Expand Up @@ -742,6 +742,7 @@ func createAPIBlockProcessorArgs(args *ApiResolverArgs, apiTransactionHandler ex
EnableEpochsHandler: args.CoreComponents.EnableEpochsHandler(),
ProofsPool: args.DataComponents.Datapool().Proofs(),
BlockChain: args.DataComponents.Blockchain(),
EnableRoundHandler: args.CoreComponents.EnableRoundsHandler(),
}

return blockApiArgs, nil
Expand Down
2 changes: 1 addition & 1 deletion factory/interface.go
Original file line number Diff line number Diff line change
Expand Up @@ -537,7 +537,7 @@ type LogsFacade interface {
type ReceiptsRepository interface {
SaveReceipts(holder common.ReceiptsHolder, header data.HeaderHandler, headerHash []byte) error
SaveReceiptsForExecResult(holder common.ReceiptsHolder, execResult data.BaseExecutionResultHandler) error
LoadReceipts(header data.HeaderHandler, headerHash []byte) (common.ReceiptsHolder, error)
LoadReceipts(receiptsHash []byte, header data.HeaderHandler, headerHash []byte) (common.ReceiptsHolder, error)
IsInterfaceNil() bool
}

Expand Down
91 changes: 91 additions & 0 deletions node/chainSimulator/chainSimulator_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ import (

"github.com/multiversx/mx-chain-core-go/core"
apiBlock "github.com/multiversx/mx-chain-core-go/data/api"
"github.com/multiversx/mx-chain-core-go/data/block"
"github.com/multiversx/mx-chain-core-go/data/transaction"
"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/require"
Expand Down Expand Up @@ -585,6 +586,96 @@ func TestSimulator_SendTransactions(t *testing.T) {
chainSimulatorCommon.CheckGenerateTransactions(t, chainSimulator)
}

func TestSimilator_MoveBalanceCheckReceipt(t *testing.T) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Simulator instead of Similator

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fixed

Copy link

Copilot AI Mar 23, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The test name TestSimilator_MoveBalanceCheckReceipt is misspelled (Similator). Since Go test selection relies on Test... names, consider correcting it to TestSimulator_MoveBalanceCheckReceipt for consistency and easier discovery.

Suggested change
func TestSimilator_MoveBalanceCheckReceipt(t *testing.T) {
func TestSimulator_MoveBalanceCheckReceipt(t *testing.T) {

Copilot uses AI. Check for mistakes.
if testing.Short() {
t.Skip("this is not a short test")
}

chainSimulator, err := NewChainSimulator(ArgsChainSimulator{
BypassTxSignatureCheck: true,
BypassCreateBlockTimeCheck: true,
TempDir: t.TempDir(),
PathToInitialConfig: defaultPathToInitialConfig,
NumOfShards: defaultNumOfShards,
RoundDurationInMillis: defaultRoundDurationInMillis,
SupernovaRoundDurationInMillis: defaultSupernovaRoundDurationInMillis,
RoundsPerEpoch: defaultRoundsPerEpoch,
SupernovaRoundsPerEpoch: defaultSupernovaRoundsPerEpoch,
ApiInterface: api.NewNoApiInterface(),
MinNodesPerShard: defaultMinNodesPerShard,
MetaChainMinNodes: defaultMetaChainMinNodes,
AlterConfigsFunction: func(cfg *config.Configs) {
cfg.EpochConfig.EnableEpochs.StakingV2EnableEpoch = 0
cfg.EpochConfig.EnableEpochs.SupernovaEnableEpoch = uint32(2)
cfg.RoundConfig.RoundActivations[string(common.SupernovaRoundFlag)] = config.ActivationRoundByName{
Round: "46",
}
},
})
require.Nil(t, err)
require.NotNil(t, chainSimulator)

defer chainSimulator.Close()

wallet0, err := chainSimulator.GenerateAndMintWalletAddress(0, chainSimulatorCommon.OneEGLD)
require.Nil(t, err)
err = chainSimulator.GenerateBlocks(1)
require.Nil(t, err)

ftx := &transaction.Transaction{
Nonce: 0,
Value: big.NewInt(1),
SndAddr: wallet0.Bytes,
RcvAddr: wallet0.Bytes,
Data: []byte(""),
GasLimit: 100_000,
GasPrice: 1_000_000_000,
ChainID: []byte(configs.ChainID),
Version: 1,
Signature: []byte("010101"),
}

checkReceipts := func(te *testing.T, aB *apiBlock.Block, value string) {
called := false
for _, mb := range aB.MiniBlocks {
if mb.Type == block.ReceiptBlock.String() {
called = true
require.Equal(te, 1, len(mb.Receipts))
require.Equal(te, value, mb.Receipts[0].Value.String())
}
}
require.True(t, called)
Copy link

Copilot AI Mar 23, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Inside checkReceipts, assertions mostly use the te parameter, but the final assertion uses the outer t (require.True(t, called)). This can report failures on the wrong *testing.T (especially if this helper is reused in subtests). Use te consistently for all assertions in this helper.

Suggested change
require.True(t, called)
require.True(te, called)

Copilot uses AI. Check for mistakes.
}

apiTx, err := chainSimulator.SendTxAndGenerateBlockTilTxIsExecuted(ftx, 10)
require.Nil(t, err)
require.NotNil(t, apiTx)

blockWithTxs, err := chainSimulator.GetNodeHandler(0).GetFacadeHandler().GetBlockByNonce(apiTx.BlockNonce, apiBlock.BlockQueryOptions{
WithTransactions: true,
WithLogs: true,
})
require.Nil(t, err)
require.Equal(t, 2, len(blockWithTxs.MiniBlocks))
checkReceipts(t, blockWithTxs, "50000000000000")

err = chainSimulator.GenerateBlocks(50)
require.Nil(t, err)

ftx.Nonce++
apiTx, err = chainSimulator.SendTxAndGenerateBlockTilTxIsExecuted(ftx, 10)
require.Nil(t, err)
require.NotNil(t, apiTx)

blockWithTxs, err = chainSimulator.GetNodeHandler(0).GetFacadeHandler().GetBlockByNonce(apiTx.BlockNonce, apiBlock.BlockQueryOptions{
WithTransactions: true,
WithLogs: true,
})
require.Nil(t, err)
require.Equal(t, 2, len(blockWithTxs.MiniBlocks))
checkReceipts(t, blockWithTxs, "500000000000")
}

func TestSimulator_SentMoveBalanceNoGasForFee(t *testing.T) {
if testing.Short() {
t.Skip("this is not a short test")
Expand Down
1 change: 1 addition & 0 deletions node/external/blockAPI/apiBlockFactory_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@ func createMockArgsAPIBlockProc() *ArgAPIBlockProcessor {
EnableEpochsHandler: &enableEpochsHandlerMock.EnableEpochsHandlerStub{},
ProofsPool: &dataRetrieverTestCommon.ProofsPoolMock{},
BlockChain: chainHandler,
EnableRoundHandler: &testscommon.EnableRoundsHandlerStub{},
}
}

Expand Down
22 changes: 16 additions & 6 deletions node/external/blockAPI/baseBlock.go
Original file line number Diff line number Diff line change
Expand Up @@ -63,12 +63,13 @@ type baseAPIBlockProcessor struct {
enableEpochsHandler common.EnableEpochsHandler
proofsPool dataRetriever.ProofsPool
blockchain data.ChainHandler
enableRoundsHandler common.EnableRoundsHandler
}

var log = logger.GetOrCreate("node/blockAPI")

func (bap *baseAPIBlockProcessor) getIntrashardMiniblocksFromReceiptsStorage(header data.HeaderHandler, headerHash []byte, options api.BlockQueryOptions) ([]*api.MiniBlock, error) {
receiptsHolder, err := bap.receiptsRepository.LoadReceipts(header, headerHash)
func (bap *baseAPIBlockProcessor) getIntrashardMiniblocksFromReceiptsStorage(receiptsHash []byte, header data.HeaderHandler, headerHash []byte, options api.BlockQueryOptions) ([]*api.MiniBlock, error) {
receiptsHolder, err := bap.receiptsRepository.LoadReceipts(receiptsHash, header, headerHash)
if err != nil {
return nil, err
}
Expand Down Expand Up @@ -234,7 +235,7 @@ func (bap *baseAPIBlockProcessor) getAndAttachTxsToMbByEpoch(
case block.InvalidBlock:
apiMiniblock.Transactions, err = bap.getTxsFromMiniblock(miniBlock, miniblockHash, header, transaction.TxTypeInvalid, dataRetriever.TransactionUnit, firstProcessedTxIndex, lastProcessedTxIndex)
case block.ReceiptBlock:
apiMiniblock.Receipts, err = bap.getReceiptsFromMiniblock(miniBlock, header.GetEpoch())
apiMiniblock.Receipts, err = bap.getReceiptsFromMiniblock(miniBlock, header.GetEpoch(), header.GetRound())
}

if err != nil {
Expand All @@ -251,8 +252,16 @@ func (bap *baseAPIBlockProcessor) getAndAttachTxsToMbByEpoch(
return nil
}

func (bap *baseAPIBlockProcessor) getReceiptsFromMiniblock(miniblock *block.MiniBlock, epoch uint32) ([]*transaction.ApiReceipt, error) {
storer, err := bap.store.GetStorer(dataRetriever.UnsignedTransactionUnit)
func (bap *baseAPIBlockProcessor) getReceiptsStorerUnitType(round uint64) dataRetriever.UnitType {
if bap.enableRoundsHandler.IsFlagEnabledInRound(common.SupernovaRoundFlag, round) {
return dataRetriever.ReceiptsUnit
}
return dataRetriever.UnsignedTransactionUnit
}

func (bap *baseAPIBlockProcessor) getReceiptsFromMiniblock(miniblock *block.MiniBlock, epoch uint32, round uint64) ([]*transaction.ApiReceipt, error) {
unit := bap.getReceiptsStorerUnitType(round)
storer, err := bap.store.GetStorer(unit)
if err != nil {
return nil, err
}
Expand Down Expand Up @@ -757,7 +766,8 @@ func (bap *baseAPIBlockProcessor) addMbsAndNumTxsAsyncExecution(apiBlock *api.Bl
mbsBeforeExecutionAndCleanup := removeExecutedTxsFromMbs(mbsBeforeExecution, executedTxsMap)

allMbs := append(mbsBeforeExecutionAndCleanup, mbsAfterExecution...)
intraMb, err := bap.getIntrashardMiniblocksFromReceiptsStorage(blockHeader, headerHash, options)
receiptsHash := executionResultHandler.GetReceiptsHash()
Copy link

Copilot AI Mar 23, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In async execution, receiptsHash := executionResultHandler.GetReceiptsHash() can be nil/empty (e.g. if the field is missing in older execution results / default-initialized). Passing that through to LoadReceipts makes decideStorageKey choose an empty key instead of falling back to the header hash for the empty-receipts case, which can prevent intrashard miniblocks from being loaded. Consider falling back to blockHeader.GetReceiptsHash() (or to bap.emptyReceiptsHash) when len(receiptsHash)==0 before calling getIntrashardMiniblocksFromReceiptsStorage.

Suggested change
receiptsHash := executionResultHandler.GetReceiptsHash()
receiptsHash := executionResultHandler.GetReceiptsHash()
if len(receiptsHash) == 0 {
// Fallback to the block header receipts hash for older/default async results
receiptsHash = blockHeader.GetReceiptsHash()
}
if len(receiptsHash) == 0 {
// If still empty, use the predefined empty receipts hash
receiptsHash = bap.emptyReceiptsHash
}

Copilot uses AI. Check for mistakes.
intraMb, err := bap.getIntrashardMiniblocksFromReceiptsStorage(receiptsHash, blockHeader, headerHash, options)
if err != nil {
return err
}
Expand Down
9 changes: 5 additions & 4 deletions node/external/blockAPI/baseBlock_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@ func createBaseBlockProcessor() *baseAPIBlockProcessor {
logsFacade: &testscommon.LogsFacadeStub{},
receiptsRepository: &testscommon.ReceiptsRepositoryStub{},
enableEpochsHandler: &enableEpochsHandlerMock.EnableEpochsHandlerStub{},
enableRoundsHandler: &testscommon.EnableRoundsHandlerStub{},
}
}

Expand All @@ -73,7 +74,7 @@ func TestBaseBlockGetIntraMiniblocksSCRS(t *testing.T) {
_ = storer.Put(scrHash, scResultBytes)

baseAPIBlockProc.receiptsRepository = &testscommon.ReceiptsRepositoryStub{
LoadReceiptsCalled: func(header data.HeaderHandler, headerHash []byte) (common.ReceiptsHolder, error) {
LoadReceiptsCalled: func(_ []byte, header data.HeaderHandler, headerHash []byte) (common.ReceiptsHolder, error) {
return holders.NewReceiptsHolder([]*block.MiniBlock{miniblock}), nil
},
}
Expand All @@ -89,7 +90,7 @@ func TestBaseBlockGetIntraMiniblocksSCRS(t *testing.T) {
}

blockHeader := &block.Header{ReceiptsHash: []byte("aaaa"), Epoch: 0}
intraMbs, err := baseAPIBlockProc.getIntrashardMiniblocksFromReceiptsStorage(blockHeader, []byte{}, api.BlockQueryOptions{WithTransactions: true})
intraMbs, err := baseAPIBlockProc.getIntrashardMiniblocksFromReceiptsStorage(blockHeader.GetReceiptsHash(), blockHeader, []byte{}, api.BlockQueryOptions{WithTransactions: true})
require.Nil(t, err)
require.Equal(t, &api.MiniBlock{
Hash: "f4add7b23eb83cf290422b0f6b770e3007b8ed3cd9683797fc90c8b4881f27bd",
Expand Down Expand Up @@ -134,7 +135,7 @@ func TestBaseBlockGetIntraMiniblocksReceipts(t *testing.T) {
_ = storer.Put(receiptHash, receiptBytes)

baseAPIBlockProc.receiptsRepository = &testscommon.ReceiptsRepositoryStub{
LoadReceiptsCalled: func(header data.HeaderHandler, headerHash []byte) (common.ReceiptsHolder, error) {
LoadReceiptsCalled: func(_ []byte, header data.HeaderHandler, headerHash []byte) (common.ReceiptsHolder, error) {
return holders.NewReceiptsHolder([]*block.MiniBlock{miniblock}), nil
},
}
Expand All @@ -154,7 +155,7 @@ func TestBaseBlockGetIntraMiniblocksReceipts(t *testing.T) {
}

blockHeader := &block.Header{ReceiptsHash: []byte("aaaa"), Epoch: 0}
intraMbs, err := baseAPIBlockProc.getIntrashardMiniblocksFromReceiptsStorage(blockHeader, []byte{}, api.BlockQueryOptions{WithTransactions: true})
intraMbs, err := baseAPIBlockProc.getIntrashardMiniblocksFromReceiptsStorage(blockHeader.GetReceiptsHash(), blockHeader, []byte{}, api.BlockQueryOptions{WithTransactions: true})
require.Nil(t, err)
require.Equal(t, &api.MiniBlock{
Hash: "596545f64319f2fcf8e0ebae06f40f3353d603f6070255588a48018c7b30c951",
Expand Down
1 change: 1 addition & 0 deletions node/external/blockAPI/blockArgs.go
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ type ArgAPIBlockProcessor struct {
AccountsRepository state.AccountsRepository
ScheduledTxsExecutionHandler process.ScheduledTxsExecutionHandler
EnableEpochsHandler common.EnableEpochsHandler
EnableRoundHandler common.EnableRoundsHandler
Copy link

Copilot AI Mar 23, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ArgAPIBlockProcessor introduces an exported field named EnableRoundHandler, but the type and the rest of the codebase use EnableRoundsHandler (plural). This inconsistency is easy to trip over and makes the API args less discoverable; consider renaming the field to EnableRoundsHandler and updating call sites accordingly.

Suggested change
EnableRoundHandler common.EnableRoundsHandler
EnableRoundsHandler common.EnableRoundsHandler

Copilot uses AI. Check for mistakes.
ProofsPool dataRetriever.ProofsPool
BlockChain data.ChainHandler
}
3 changes: 3 additions & 0 deletions node/external/blockAPI/check.go
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,9 @@ func checkNilArg(arg *ArgAPIBlockProcessor) error {
if check.IfNil(arg.BlockChain) {
return process.ErrNilBlockChain
}
if check.IfNil(arg.EnableRoundHandler) {
return process.ErrNilEnableRoundsHandler
}

return core.CheckHandlerCompatibility(arg.EnableEpochsHandler, []core.EnableEpochFlag{
common.RefactorPeersMiniBlocksFlag,
Expand Down
2 changes: 1 addition & 1 deletion node/external/blockAPI/interface.go
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,6 @@ type logsFacade interface {
}

type receiptsRepository interface {
LoadReceipts(header data.HeaderHandler, headerHash []byte) (common.ReceiptsHolder, error)
LoadReceipts(receiptsHash []byte, header data.HeaderHandler, headerHash []byte) (common.ReceiptsHolder, error)
IsInterfaceNil() bool
}
42 changes: 2 additions & 40 deletions node/external/blockAPI/metaBlock.go
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ func newMetaApiBlockProcessor(arg *ArgAPIBlockProcessor, emptyReceiptsHash []byt
enableEpochsHandler: arg.EnableEpochsHandler,
proofsPool: arg.ProofsPool,
blockchain: arg.BlockChain,
enableRoundsHandler: arg.EnableRoundHandler,
},
}
}
Expand Down Expand Up @@ -176,43 +177,6 @@ func (mbp *metaAPIBlockProcessor) convertMetaBlockBytesToAPIBlock(hash []byte, b
return nil, err
}

numOfTxs := uint32(0)
miniblocks := make([]*api.MiniBlock, 0)
for _, mb := range blockHeader.GetMiniBlockHeaderHandlers() {
if mb.GetTypeInt32() == int32(block.PeerBlock) {
continue
}

numOfTxs += mb.GetTxCount()

miniblockAPI := &api.MiniBlock{
Hash: hex.EncodeToString(mb.GetHash()),
Type: block.ProcessingType(mb.GetProcessingType()).String(),
SourceShard: mb.GetSenderShardID(),
DestinationShard: mb.GetReceiverShardID(),
}
if options.WithTransactions {
miniBlockCopy := mb
err = mbp.getAndAttachTxsToMb(miniBlockCopy, blockHeader, miniblockAPI, options)
if err != nil {
return nil, err
}
}

miniblocks = append(miniblocks, miniblockAPI)
}

intraMb, err := mbp.getIntrashardMiniblocksFromReceiptsStorage(blockHeader, hash, options)
if err != nil {
return nil, err
}

if len(intraMb) > 0 {
miniblocks = append(miniblocks, intraMb...)
}

miniblocks = filterOutDuplicatedMiniblocks(miniblocks)

notarizedBlocks := make([]*api.NotarizedBlock, 0, len(blockHeader.GetShardInfoHandlers()))
for _, shardData := range blockHeader.GetShardInfoHandlers() {
notarizedBlock := &api.NotarizedBlock{
Expand All @@ -237,9 +201,7 @@ func (mbp *metaAPIBlockProcessor) convertMetaBlockBytesToAPIBlock(hash []byte, b
Shard: core.MetachainShardId,
Hash: hex.EncodeToString(hash),
PrevBlockHash: hex.EncodeToString(blockHeader.GetPrevHash()),
NumTxs: numOfTxs,
NotarizedBlocks: notarizedBlocks,
MiniBlocks: miniblocks,
Comment on lines -240 to -242
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

add activation flag check for this? or maybe better keep it as before, with propored miniblocks and num of txs?

AccumulatedFees: blockHeader.GetAccumulatedFees().String(),
DeveloperFees: blockHeader.GetDeveloperFees().String(),
AccumulatedFeesInEpoch: blockHeader.GetAccumulatedFeesInEpoch().String(),
Expand Down Expand Up @@ -320,7 +282,7 @@ func (mbp *metaAPIBlockProcessor) addMbsAndNumTxsV1(apiBlock *api.Block, blockHe
return err
}

intraMb, err := mbp.getIntrashardMiniblocksFromReceiptsStorage(blockHeader, headerHash, options)
intraMb, err := mbp.getIntrashardMiniblocksFromReceiptsStorage(blockHeader.GetReceiptsHash(), blockHeader, headerHash, options)
if err != nil {
return err
}
Expand Down
44 changes: 2 additions & 42 deletions node/external/blockAPI/shardBlock.go
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ func newShardApiBlockProcessor(arg *ArgAPIBlockProcessor, emptyReceiptsHash []by
enableEpochsHandler: arg.EnableEpochsHandler,
proofsPool: arg.ProofsPool,
blockchain: arg.BlockChain,
enableRoundsHandler: arg.EnableRoundHandler,
},
}
}
Expand Down Expand Up @@ -178,45 +179,6 @@ func (sbp *shardAPIBlockProcessor) convertShardBlockBytesToAPIBlock(hash []byte,
return nil, err
}

numOfTxs := uint32(0)
miniblocks := make([]*api.MiniBlock, 0)

for _, mb := range blockHeader.GetMiniBlockHeaderHandlers() {
if block.Type(mb.GetTypeInt32()) == block.PeerBlock {
continue
}

numOfTxs += mb.GetTxCount()

miniblockAPI := &api.MiniBlock{
Hash: hex.EncodeToString(mb.GetHash()),
Type: block.Type(mb.GetTypeInt32()).String(),
SourceShard: mb.GetSenderShardID(),
DestinationShard: mb.GetReceiverShardID(),
ProcessingType: block.ProcessingType(mb.GetProcessingType()).String(),
ConstructionState: block.MiniBlockState(mb.GetConstructionState()).String(),
IndexOfFirstTxProcessed: mb.GetIndexOfFirstTxProcessed(),
IndexOfLastTxProcessed: mb.GetIndexOfLastTxProcessed(),
}
if options.WithTransactions {
miniBlockCopy := mb
err = sbp.getAndAttachTxsToMb(miniBlockCopy, blockHeader, miniblockAPI, options)
if err != nil {
return nil, err
}
}

miniblocks = append(miniblocks, miniblockAPI)
}

intraMb, err := sbp.getIntrashardMiniblocksFromReceiptsStorage(blockHeader, hash, options)
if err != nil {
return nil, err
}

miniblocks = append(miniblocks, intraMb...)
miniblocks = filterOutDuplicatedMiniblocks(miniblocks)

timestampSec, timestampMs, err := common.GetHeaderTimestamps(blockHeader, sbp.enableEpochsHandler)
if err != nil {
return nil, err
Expand All @@ -229,8 +191,6 @@ func (sbp *shardAPIBlockProcessor) convertShardBlockBytesToAPIBlock(hash []byte,
Shard: blockHeader.GetShardID(),
Hash: hex.EncodeToString(hash),
PrevBlockHash: hex.EncodeToString(blockHeader.GetPrevHash()),
NumTxs: numOfTxs,
MiniBlocks: miniblocks,
Comment on lines -232 to -233
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

same here

AccumulatedFees: blockHeader.GetAccumulatedFees().String(),
DeveloperFees: blockHeader.GetDeveloperFees().String(),
Timestamp: int64(timestampSec),
Expand Down Expand Up @@ -321,7 +281,7 @@ func (sbp *shardAPIBlockProcessor) addMbsAndNumTxsV1(apiBlock *api.Block, blockH
miniblocks = append(miniblocks, miniblockAPI)
}

intraMb, err := sbp.getIntrashardMiniblocksFromReceiptsStorage(blockHeader, headerHash, options)
intraMb, err := sbp.getIntrashardMiniblocksFromReceiptsStorage(blockHeader.GetReceiptsHash(), blockHeader, headerHash, options)
if err != nil {
return err
}
Expand Down
Loading
Loading