From 92fdc0a4b6208387424029182a131b25a2f92dac Mon Sep 17 00:00:00 2001 From: Aaron Buchwald Date: Wed, 16 Sep 2020 23:39:26 -0400 Subject: Switch from ctx.Log to eth logger --- plugin/evm/block.go | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) (limited to 'plugin/evm/block.go') 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} } -- cgit v1.2.3