aboutsummaryrefslogtreecommitdiff
path: root/plugin/evm/block.go
diff options
context:
space:
mode:
Diffstat (limited to 'plugin/evm/block.go')
-rw-r--r--plugin/evm/block.go15
1 files changed, 12 insertions, 3 deletions
diff --git a/plugin/evm/block.go b/plugin/evm/block.go
index d75ea1d..b3412a0 100644
--- a/plugin/evm/block.go
+++ b/plugin/evm/block.go
@@ -27,9 +27,18 @@ func (b *Block) ID() ids.ID { return b.id }
// Accept implements the snowman.Block interface
func (b *Block) Accept() error {
- b.vm.ctx.Log.Verbo("Block %s is accepted", b.ID())
- b.vm.updateStatus(b.ID(), choices.Accepted)
- return nil
+ vm := b.vm
+
+ vm.ctx.Log.Verbo("Block %s is accepted", b.ID())
+ vm.updateStatus(b.ID(), choices.Accepted)
+
+ tx := vm.getAtomicTx(b.ethBlock)
+ utx, ok := tx.UnsignedTx.(UnsignedAtomicTx)
+ if !ok {
+ return errors.New("unknown atomic tx type")
+ }
+
+ return utx.Accept(vm.ctx, nil)
}
// Reject implements the snowman.Block interface