aboutsummaryrefslogtreecommitdiffstats
path: root/accounts/abi/bind
diff options
context:
space:
mode:
authorPéter Szilágyi <peterke@gmail.com>2017-02-22 22:58:00 +0800
committerPéter Szilágyi <peterke@gmail.com>2017-02-23 18:16:46 +0800
commit23a5d64fd059bb8bdf02781608a15b8b1bdbdfd2 (patch)
tree143cd04a9fe002b25c146e7c0b5aacfbe62092eb /accounts/abi/bind
parent61e6bb12478740d614c8effd330f881f962b7b84 (diff)
downloadgo-tangerine-23a5d64fd059bb8bdf02781608a15b8b1bdbdfd2.tar
go-tangerine-23a5d64fd059bb8bdf02781608a15b8b1bdbdfd2.tar.gz
go-tangerine-23a5d64fd059bb8bdf02781608a15b8b1bdbdfd2.tar.bz2
go-tangerine-23a5d64fd059bb8bdf02781608a15b8b1bdbdfd2.tar.lz
go-tangerine-23a5d64fd059bb8bdf02781608a15b8b1bdbdfd2.tar.xz
go-tangerine-23a5d64fd059bb8bdf02781608a15b8b1bdbdfd2.tar.zst
go-tangerine-23a5d64fd059bb8bdf02781608a15b8b1bdbdfd2.zip
accounts, cmd: port packages over to the new logging system
Diffstat (limited to 'accounts/abi/bind')
-rw-r--r--accounts/abi/bind/util.go9
1 files changed, 5 insertions, 4 deletions
diff --git a/accounts/abi/bind/util.go b/accounts/abi/bind/util.go
index 88234688e..ca79694ef 100644
--- a/accounts/abi/bind/util.go
+++ b/accounts/abi/bind/util.go
@@ -29,18 +29,19 @@ import (
// WaitMined waits for tx to be mined on the blockchain.
// It stops waiting when the context is canceled.
func WaitMined(ctx context.Context, b DeployBackend, tx *types.Transaction) (*types.Receipt, error) {
- queryTicker := time.NewTicker(1 * time.Second)
+ queryTicker := time.NewTicker(time.Second)
defer queryTicker.Stop()
- loghash := tx.Hash().Hex()[:8]
+
+ logger := log.New("hash", tx.Hash().Hex()[:8])
for {
receipt, err := b.TransactionReceipt(ctx, tx.Hash())
if receipt != nil {
return receipt, nil
}
if err != nil {
- log.Trace(fmt.Sprintf("tx %x error: %v", loghash, err))
+ logger.Trace("Receipt retrieval failed", "error", err)
} else {
- log.Trace(fmt.Sprintf("tx %x not yet mined...", loghash))
+ logger.Trace("Transaction not yet mined")
}
// Wait for the next round.
select {