Skip to content

Commit b1f2fcf

Browse files
committed
Address comments.
1 parent 38a9e26 commit b1f2fcf

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

statediff/indexer/indexer.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -115,8 +115,8 @@ func (sdi *StateDiffIndexer) PushBlock(block *types.Block, receipts types.Receip
115115
return nil, fmt.Errorf("error creating IPLD nodes from block and receipts: %v", err)
116116
}
117117

118-
if len(txNodes) != len(txTrieNodes) && len(rctNodes) != len(rctTrieNodes) && len(txNodes) != len(rctNodes) {
119-
return nil, fmt.Errorf("expected number of transactions (%d), transaction trie nodes (%d), receipts (%d), and receipt trie nodes (%d)to be equal", len(txNodes), len(txTrieNodes), len(rctNodes), len(rctTrieNodes))
118+
if len(txNodes) != len(rctNodes) || len(rctNodes) != len(rctLeafNodeCIDs) {
119+
return nil, fmt.Errorf("expected number of transactions (%d), receipts (%d), and receipt trie leaf nodes (%d)to be equal", len(txNodes), len(rctNodes), len(rctLeafNodeCIDs))
120120
}
121121

122122
// Calculate reward

0 commit comments

Comments
 (0)