diff options
author | Determinant <[email protected]> | 2020-08-20 02:22:34 -0400 |
---|---|---|
committer | Determinant <[email protected]> | 2020-08-20 02:22:34 -0400 |
commit | 6febda1bc51f6658ab8f5cf705454e3f9c24a1f4 (patch) | |
tree | db716d6f8860a9b14e0bba468bb29fd40fba3eaa /plugin/evm/block.go | |
parent | b3fb1dc6ed3c5610c03abdd6f2ff7bf164fb83ca (diff) | |
parent | 4e5a71321d1c7024f1108c75ea4e749ce7cbf706 (diff) |
Merge remote-tracking branch 'origin/ecstasy-transfer' into ecstasy-transfer
Diffstat (limited to 'plugin/evm/block.go')
-rw-r--r-- | plugin/evm/block.go | 15 |
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 |