Merge pull request #472 from tendermint/string_reprs

Add Tx String representation. Got the ok from Anton.
This commit is contained in:
Adrian Brink 2017-05-15 09:49:40 +02:00 committed by GitHub
commit 118d565534
1 changed files with 5 additions and 0 deletions

View File

@ -3,6 +3,7 @@ package types
import (
"bytes"
"errors"
"fmt"
abci "github.com/tendermint/abci/types"
"github.com/tendermint/go-wire/data"
@ -19,6 +20,10 @@ func (tx Tx) Hash() []byte {
return merkle.SimpleHashFromBinary(tx)
}
func (tx Tx) String() string {
return fmt.Sprintf("Tx{%X}")
}
type Txs []Tx
func (txs Txs) Hash() []byte {