forked from cerc-io/laconicd-deprecated
evm: various fixes (#319)
* evm: use prefix stores, move SetBlockBloom to EndBlock, bug fixes * add logs to genesis state * log tests * commit and finalize on InitGenesis * validate TransactionLogs * changelog * fix test-import * fix lint * add more tests
This commit is contained in:
@@ -236,9 +236,10 @@ func (suite *EvmTestSuite) TestHandlerLogs() {
|
||||
suite.Require().Equal(len(resultData.Logs[0].Topics), 2)
|
||||
|
||||
hash := []byte{1}
|
||||
suite.app.EvmKeeper.SetTransactionLogs(suite.ctx, hash, resultData.Logs)
|
||||
err = suite.app.EvmKeeper.SetLogs(suite.ctx, ethcmn.BytesToHash(hash), resultData.Logs)
|
||||
suite.Require().NoError(err)
|
||||
|
||||
logs, err := suite.app.EvmKeeper.GetTransactionLogs(suite.ctx, hash)
|
||||
logs, err := suite.app.EvmKeeper.GetLogs(suite.ctx, ethcmn.BytesToHash(hash))
|
||||
suite.Require().NoError(err, "failed to get logs")
|
||||
|
||||
suite.Require().Equal(logs, resultData.Logs)
|
||||
@@ -273,7 +274,7 @@ func (suite *EvmTestSuite) TestQueryTxLogs() {
|
||||
// get logs by tx hash
|
||||
hash := resultData.TxHash.Bytes()
|
||||
|
||||
logs, err := suite.app.EvmKeeper.GetTransactionLogs(suite.ctx, hash)
|
||||
logs, err := suite.app.EvmKeeper.GetLogs(suite.ctx, ethcmn.BytesToHash(hash))
|
||||
suite.Require().NoError(err, "failed to get logs")
|
||||
|
||||
suite.Require().Equal(logs, resultData.Logs)
|
||||
|
||||
Reference in New Issue
Block a user