@@ -46,7 +46,6 @@ import (
4646const (
4747 defaultGas = 90000
4848 defaultGasPrice = 50 * params .Shannon
49- emptyHex = "0x"
5049)
5150
5251// PublicEthereumAPI provides an API to access Ethereum related information.
@@ -548,26 +547,6 @@ func (s *PublicBlockChainAPI) GetStorageAt(ctx context.Context, address common.A
548547 return res [:], state .Error ()
549548}
550549
551- // callmsg is the message type used for call transitions.
552- type callmsg struct {
553- addr common.Address
554- to * common.Address
555- gas , gasPrice * big.Int
556- value * big.Int
557- data []byte
558- }
559-
560- // accessor boilerplate to implement core.Message
561- func (m callmsg ) From () (common.Address , error ) { return m .addr , nil }
562- func (m callmsg ) FromFrontier () (common.Address , error ) { return m .addr , nil }
563- func (m callmsg ) Nonce () uint64 { return 0 }
564- func (m callmsg ) CheckNonce () bool { return false }
565- func (m callmsg ) To () * common.Address { return m .to }
566- func (m callmsg ) GasPrice () * big.Int { return m .gasPrice }
567- func (m callmsg ) Gas () * big.Int { return m .gas }
568- func (m callmsg ) Value () * big.Int { return m .value }
569- func (m callmsg ) Data () []byte { return m .data }
570-
571550// CallArgs represents the arguments for a call.
572551type CallArgs struct {
573552 From common.Address `json:"from"`
@@ -626,10 +605,8 @@ func (s *PublicBlockChainAPI) doCall(ctx context.Context, args CallArgs, blockNr
626605 // Wait for the context to be done and cancel the evm. Even if the
627606 // EVM has finished, cancelling may be done (repeatedly)
628607 go func () {
629- select {
630- case <- ctx .Done ():
631- evm .Cancel ()
632- }
608+ <- ctx .Done ()
609+ evm .Cancel ()
633610 }()
634611
635612 // Setup the gas pool (also for unmetered requests)
@@ -1306,7 +1283,7 @@ func (api *PublicDebugAPI) PrintBlock(ctx context.Context, number uint64) (strin
13061283 if block == nil {
13071284 return "" , fmt .Errorf ("block #%d not found" , number )
13081285 }
1309- return fmt . Sprintf ( "%s" , block ), nil
1286+ return block . String ( ), nil
13101287}
13111288
13121289// SeedHash retrieves the seed hash of a block.
0 commit comments