add state check assert routine

This commit is contained in:
alex.sharov 2021-08-28 14:23:26 +07:00
parent c5e9a95c3e
commit b0d24509ac

View File

@ -691,6 +691,7 @@ func (sc *SendersCache) flush(tx kv.RwTx, byNonce *ByNonce, sendersWithoutTransa
func loadSender(coreTx kv.Tx, addr []byte) (*senderInfo, error) {
encoded, err := coreTx.GetOne(kv.PlainState, addr)
if err != nil {
panic(err)
return nil, err
}
if len(encoded) == 0 {
@ -699,6 +700,7 @@ func loadSender(coreTx kv.Tx, addr []byte) (*senderInfo, error) {
}
nonce, balance, err := DecodeSender(encoded)
if err != nil {
panic(err)
return nil, err
}
return newSenderInfo(nonce, balance), nil