From 4c7a2be06afa9bea6ee8aa6f8ea2b1129d93af8e Mon Sep 17 00:00:00 2001 From: Jae Kwon Date: Sun, 30 Apr 2017 16:03:30 -0700 Subject: [PATCH] Add Tx String representation --- types/tx.go | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/types/tx.go b/types/tx.go index e62b5f666..5656638ae 100644 --- a/types/tx.go +++ b/types/tx.go @@ -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 {