Add Tx String representation

This commit is contained in:
Jae Kwon 2017-04-30 16:03:30 -07:00
parent 1310c72647
commit 4c7a2be06a
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/tmlibs/merkle"
@ -18,6 +19,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 {