aboutsummaryrefslogtreecommitdiff
path: root/plugin/evm/block.go
diff options
context:
space:
mode:
authorStephenButtolph <[email protected]>2020-09-11 13:59:47 -0400
committerStephenButtolph <[email protected]>2020-09-11 13:59:47 -0400
commit288833d594c333af551cb656cfab60ed52054eae (patch)
tree3c5047442b68bfeec75f54b6c8fedd974330d6b6 /plugin/evm/block.go
parente79850702a6610df73a363a32f9c9bfd4fdfc513 (diff)
added accepted status cachingv0.2.15-rc.3
Diffstat (limited to 'plugin/evm/block.go')
-rw-r--r--plugin/evm/block.go7
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 {