Use BlockCache for RPC/mempool and added TxId()

TxId() uses signbytes
This commit is contained in:
Jae Kwon
2015-03-29 18:43:27 -07:00
parent 19a50c1229
commit 5cb57d3eaa
6 changed files with 18 additions and 7 deletions
+7
View File
@@ -254,3 +254,10 @@ func (tx *DupeoutTx) WriteSignBytes(w io.Writer, n *int64, err *error) {
func (tx *DupeoutTx) String() string {
return Fmt("DupeoutTx{%X,%v,%v}", tx.Address, tx.VoteA, tx.VoteB)
}
//-----------------------------------------------------------------------------
func TxId(tx Tx) []byte {
signBytes := account.SignBytes(tx)
return binary.BinaryRipemd160(signBytes)
}