Closed ffranr closed 3 months ago
Totals | |
---|---|
Change from base Build 8334044258: | 0.006% |
Covered Lines: | 29421 |
Relevant Lines: | 51741 |
I am aware of chainhash.Hash.String()
, but I still think this PR is a good idea.
This PR makes it clear what txid
is in relation to MsgTx
. It isn't clear that chainhash.Hash.String()
is txid
. And it isn't necessarily always txid
because chainhash.Hash
doesn't have to be a double sha256.
@yyforyongyu for your review
This commit adds a method to MsgTx called TxID. This method returns the transaction ID (txid) of the subject transaction. This commit also adds a function for deriving the transaction ID from the double hash of the transaction.