From 4360ae2f70ec087f07792f8f2044d574b29fc7a9 Mon Sep 17 00:00:00 2001 From: Unique-Divine Date: Fri, 8 Nov 2024 06:43:23 -0600 Subject: [PATCH] changelog + fix inconsistent test --- CHANGELOG.md | 3 ++- eth/rpc/rpcapi/eth_api_test.go | 6 +++++- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 387a3a501..85be6188d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -100,7 +100,8 @@ tests for race conditions within funtoken precompile - [#2100](https://github.com/NibiruChain/nibiru/pull/2100) - refactor: cleanup statedb and precompile sections - [#2101](https://github.com/NibiruChain/nibiru/pull/2101) - fix(evm): tx receipt proper marshalling - [#2105](https://github.com/NibiruChain/nibiru/pull/2105) - test(evm): precompile call with revert -- [#2107](https://github.com/NibiruChain/nibiru/pull/2107) - feat(evm-funtoken-precompile): Implement balance and bankBalance methods +- [#2107](https://github.com/NibiruChain/nibiru/pull/2107) - +feat(evm-funtoken-precompile): Implement methods: balance, bankBalance, whoAmI #### Nibiru EVM | Before Audit 1 - 2024-10-18 diff --git a/eth/rpc/rpcapi/eth_api_test.go b/eth/rpc/rpcapi/eth_api_test.go index 1a599d2f1..e514032ef 100644 --- a/eth/rpc/rpcapi/eth_api_test.go +++ b/eth/rpc/rpcapi/eth_api_test.go @@ -106,7 +106,11 @@ func (s *NodeSuite) Test_BlockNumber() { ethBlockNumber, err := s.ethClient.BlockNumber(context.Background()) s.NoError(err) - s.Equal(networkBlockNumber, int64(ethBlockNumber)) + // It might be off by 1 block in either direction. + blockDiff := networkBlockNumber - int64(ethBlockNumber) + s.LessOrEqualf(blockDiff, 2, "networkBlockNumber %d, ethBlockNumber %d", + networkBlockNumber, ethBlockNumber, + ) } // Test_BlockByNumber EVM method: eth_getBlockByNumber