Skip to content

Commit

Permalink
tested blockchain-info (rollkit#1343)
Browse files Browse the repository at this point in the history
closes: rollkit#1261 


<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
## Summary by CodeRabbit

- **Tests**
- Enhanced blockchain information testing to ensure the accuracy of
block metadata properties, including various hashes and versions.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
  • Loading branch information
chandiniv1 authored Nov 17, 2023
1 parent f780a3b commit 5919fa9
Showing 1 changed file with 17 additions and 0 deletions.
17 changes: 17 additions & 0 deletions node/full_client_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -705,6 +705,23 @@ func TestBlockchainInfo(t *testing.T) {
assert.Equal(result.LastHeight, heights[9])
assert.Contains(result.BlockMetas, test.exp[0])
assert.Contains(result.BlockMetas, test.exp[1])
assert.Equal(result.BlockMetas[0].BlockID.Hash, test.exp[1].BlockID.Hash)
assert.Equal(result.BlockMetas[len(result.BlockMetas)-1].BlockID.Hash, test.exp[0].BlockID.Hash)
assert.Equal(result.BlockMetas[0].Header.Version.Block, test.exp[1].Header.Version.Block)
assert.Equal(result.BlockMetas[len(result.BlockMetas)-1].Header.Version.Block, test.exp[0].Header.Version.Block)
assert.Equal(result.BlockMetas[0].Header, test.exp[1].Header)
assert.Equal(result.BlockMetas[len(result.BlockMetas)-1].Header, test.exp[0].Header)
assert.Equal(result.BlockMetas[0].Header.DataHash, test.exp[1].Header.DataHash)
assert.Equal(result.BlockMetas[len(result.BlockMetas)-1].Header.DataHash, test.exp[0].Header.DataHash)
assert.Equal(result.BlockMetas[0].Header.LastCommitHash, test.exp[1].Header.LastCommitHash)
assert.Equal(result.BlockMetas[len(result.BlockMetas)-1].Header.LastCommitHash, test.exp[0].Header.LastCommitHash)
assert.Equal(result.BlockMetas[0].Header.EvidenceHash, test.exp[1].Header.EvidenceHash)
assert.Equal(result.BlockMetas[len(result.BlockMetas)-1].Header.AppHash, test.exp[0].Header.AppHash)
assert.Equal(result.BlockMetas[0].Header.AppHash, test.exp[1].Header.AppHash)
assert.Equal(result.BlockMetas[len(result.BlockMetas)-1].Header.ConsensusHash, test.exp[0].Header.ConsensusHash)
assert.Equal(result.BlockMetas[0].Header.ConsensusHash, test.exp[1].Header.ConsensusHash)
assert.Equal(result.BlockMetas[len(result.BlockMetas)-1].Header.ValidatorsHash, test.exp[0].Header.ValidatorsHash)
assert.Equal(result.BlockMetas[0].Header.NextValidatorsHash, test.exp[1].Header.NextValidatorsHash)
}

})
Expand Down

0 comments on commit 5919fa9

Please sign in to comment.