diff options
author | StephenButtolph <[email protected]> | 2020-09-11 13:59:47 -0400 |
---|---|---|
committer | StephenButtolph <[email protected]> | 2020-09-11 13:59:47 -0400 |
commit | 288833d594c333af551cb656cfab60ed52054eae (patch) | |
tree | 3c5047442b68bfeec75f54b6c8fedd974330d6b6 /plugin/evm/block.go | |
parent | e79850702a6610df73a363a32f9c9bfd4fdfc513 (diff) |
added accepted status cachingv0.2.15-rc.3
Diffstat (limited to 'plugin/evm/block.go')
-rw-r--r-- | plugin/evm/block.go | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/plugin/evm/block.go b/plugin/evm/block.go index cdb26bd..97ffc18 100644 --- a/plugin/evm/block.go +++ b/plugin/evm/block.go @@ -30,8 +30,11 @@ func (b *Block) ID() ids.ID { return b.id } func (b *Block) Accept() error { vm := b.vm - vm.ctx.Log.Verbo("Block %s is accepted", b.ID()) - vm.updateStatus(b.ID(), choices.Accepted) + vm.ctx.Log.Verbo("Block %s is accepted", b.id) + vm.updateStatus(b.id, choices.Accepted) + if err := vm.acceptedDB.Put(b.ethBlock.Number().Bytes(), b.id.Bytes()); err != nil { + return err + } tx := vm.getAtomicTx(b.ethBlock) if tx == nil { |