mirror of
https://github.com/fluencelabs/tendermint
synced 2025-04-25 06:42:16 +00:00
Merge pull request #472 from tendermint/string_reprs
Add Tx String representation. Got the ok from Anton.
This commit is contained in:
commit
118d565534
@ -3,6 +3,7 @@ package types
|
|||||||
import (
|
import (
|
||||||
"bytes"
|
"bytes"
|
||||||
"errors"
|
"errors"
|
||||||
|
"fmt"
|
||||||
|
|
||||||
abci "github.com/tendermint/abci/types"
|
abci "github.com/tendermint/abci/types"
|
||||||
"github.com/tendermint/go-wire/data"
|
"github.com/tendermint/go-wire/data"
|
||||||
@ -19,6 +20,10 @@ func (tx Tx) Hash() []byte {
|
|||||||
return merkle.SimpleHashFromBinary(tx)
|
return merkle.SimpleHashFromBinary(tx)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func (tx Tx) String() string {
|
||||||
|
return fmt.Sprintf("Tx{%X}")
|
||||||
|
}
|
||||||
|
|
||||||
type Txs []Tx
|
type Txs []Tx
|
||||||
|
|
||||||
func (txs Txs) Hash() []byte {
|
func (txs Txs) Hash() []byte {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user