HomePhabricator

Start differenciating txid and txhash

Description

Start differenciating txid and txhash

Summary:
Introduces the YxId and TxHash types. This will ensure type safety for cases requiring to use an id and cases requiring to use a hash.

To quote D665 :
This is the basis of MalFix with naming txhash/txid.

It is quite tricky to ensure no txid is kept where txhash is meant.
As txid will be rare, I propose for safety to fully rename txid to
txhash, eliminating txid usage before reintroducing txid to COutpoint.

Test Plan:

make check

Reviewers: schancel, tomtomtom7, #bitcoin_abc, jasonbcox, dagurval

Reviewed By: #bitcoin_abc, jasonbcox, dagurval

Subscribers: jasonbcox

Differential Revision: https://reviews.bitcoinabc.org/D755

Details

Provenance
tomtomtom7Authored on Dec 5 2017, 15:19
deadalnixCommitted on Dec 6 2017, 13:00
deadalnixPushed on Dec 6 2017, 13:00
Reviewer
Restricted Project
Differential Revision
D755: Start differenciating txid and txhash
Parents
rABC22b6d9f54066: A pack of nits
Branches
Unknown
Tags
Unknown