aboutsummaryrefslogtreecommitdiff
path: root/plugin/evm/block.go
diff options
context:
space:
mode:
authorAaron Buchwald <[email protected]>2020-09-16 23:39:26 -0400
committerAaron Buchwald <[email protected]>2020-09-16 23:39:26 -0400
commit92fdc0a4b6208387424029182a131b25a2f92dac (patch)
tree48d339576b502be17d1b0c541d007cc1c67cb857 /plugin/evm/block.go
parente0a89758b76ffc2a1bfbb73405b0324abe966d0b (diff)
Switch from ctx.Log to eth logger
Diffstat (limited to 'plugin/evm/block.go')
-rw-r--r--plugin/evm/block.go7
1 files changed, 3 insertions, 4 deletions
diff --git a/plugin/evm/block.go b/plugin/evm/block.go
index 98280f0..ff1f6ae 100644
--- a/plugin/evm/block.go
+++ b/plugin/evm/block.go
@@ -8,6 +8,7 @@ import (
"fmt"
"github.com/ava-labs/coreth/core/types"
+ "github.com/ethereum/go-ethereum/log"
"github.com/ethereum/go-ethereum/rlp"
"github.com/ava-labs/avalanchego/ids"
@@ -30,7 +31,7 @@ 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)
+ log.Trace(fmt.Sprintf("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
@@ -50,7 +51,7 @@ func (b *Block) Accept() error {
// Reject implements the snowman.Block interface
func (b *Block) Reject() error {
- b.vm.ctx.Log.Verbo("Block %s is rejected", b.ID())
+ log.Trace(fmt.Sprintf("Block %s is rejected", b.ID()))
b.vm.updateStatus(b.ID(), choices.Rejected)
return nil
}
@@ -68,10 +69,8 @@ func (b *Block) Status() choices.Status {
func (b *Block) Parent() snowman.Block {
parentID := ids.NewID(b.ethBlock.ParentHash())
if block := b.vm.getBlock(parentID); block != nil {
- b.vm.ctx.Log.Verbo("Parent(%s) has status: %s", parentID, block.Status())
return block
}
- b.vm.ctx.Log.Verbo("Parent(%s) has status: %s", parentID, choices.Unknown)
return &missing.Block{BlkID: parentID}
}