aboutsummaryrefslogtreecommitdiff
path: root/plugin/evm/block.go
diff options
context:
space:
mode:
authoraaronbuchwald <[email protected]>2020-09-15 12:05:01 -0400
committerGitHub <[email protected]>2020-09-15 12:05:01 -0400
commit8ea2f6ef629136b746e5fb245f0804422223c976 (patch)
tree8b9c77ddac162591976875e6b299054f7415402f /plugin/evm/block.go
parent14592f971162fed59a33afd98020599097406cdf (diff)
parent496397e31c5082e20e28a1a2e9c2bbacde5e1deb (diff)
Merge pull request #22 from ava-labs/status-db
Status db
Diffstat (limited to 'plugin/evm/block.go')
-rw-r--r--plugin/evm/block.go15
1 files changed, 9 insertions, 6 deletions
diff --git a/plugin/evm/block.go b/plugin/evm/block.go
index 5c30fe1..97ffc18 100644
--- a/plugin/evm/block.go
+++ b/plugin/evm/block.go
@@ -10,10 +10,10 @@ import (
"github.com/ava-labs/coreth/core/types"
"github.com/ava-labs/go-ethereum/rlp"
- "github.com/ava-labs/gecko/ids"
- "github.com/ava-labs/gecko/snow/choices"
- "github.com/ava-labs/gecko/snow/consensus/snowman"
- "github.com/ava-labs/gecko/vms/components/missing"
+ "github.com/ava-labs/avalanche-go/ids"
+ "github.com/ava-labs/avalanche-go/snow/choices"
+ "github.com/ava-labs/avalanche-go/snow/consensus/snowman"
+ "github.com/ava-labs/avalanche-go/vms/components/missing"
)
// Block implements the snowman.Block interface
@@ -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 {