-
Notifications
You must be signed in to change notification settings - Fork 161
Conversation
@@ -75,6 +75,7 @@ func NewGenesisStorage(key, value ethcmn.Hash) GenesisStorage { | |||
func DefaultGenesisState() GenesisState { | |||
return GenesisState{ | |||
Accounts: []GenesisAccount{}, | |||
TxsLogs: []TransactionLogs{}, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nice, this will be handy
logs, err := s.GetLogs(ch.txhash) | ||
if err != nil { | ||
// panic on unmarshal error | ||
panic(err) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
hm... panic
seems intense
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is an internal error that is only present is there's an unmarshal error. We want to panic here bc otherwise we could persist invalid state and have to manually stop the chain (which requires coordination of +1/3 validatiors) and then roll-back to the height before the first error instance of this error occurred.
Having a panic prevents this overhead and allows us to detect these errors during development 🙂
@noot this is ready for review again. I'll write tests for the logs validations after I finish the WebSocket PR |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
code looks good, but please fix tests + lint!
@fedekunze I think this causes some issue with transaction receipts, I ran the rpc tests and the
or |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
running the rpc tests separately works, so I'll approve, but we should look into why it doesn't work when you run them all together
Description
SetBlockBloom
toEndBlock
For contributor use:
docs/
) or specification (x/<module>/spec/
)godoc
comments.Unreleased
section inCHANGELOG.md
Files changed
in the Github PR explorerFor admin use:
WIP
,R4R
,docs
, etc)