diff options
author | Pieter Wuille <pieter@wuille.net> | 2020-07-22 17:17:00 -0700 |
---|---|---|
committer | Pieter Wuille <pieter@wuille.net> | 2020-07-30 13:44:54 -0700 |
commit | 9efd86a908cf09d9ddbadd3195f202635117d505 (patch) | |
tree | ec801408297a936d5602b9fa1438a44accf7d4b6 /src/protocol.cpp | |
parent | d362f19355b36531a4a82094e0259f7f3db500a7 (diff) |
refactor: add GenTxid (=txid or wtxid) type and use it for tx request logic
Diffstat (limited to 'src/protocol.cpp')
-rw-r--r-- | src/protocol.cpp | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/protocol.cpp b/src/protocol.cpp index ee77ca3b94..5a91acee0f 100644 --- a/src/protocol.cpp +++ b/src/protocol.cpp @@ -241,3 +241,9 @@ std::vector<std::string> serviceFlagsToStr(uint64_t flags) return str_flags; } + +GenTxid ToGenTxid(const CInv& inv) +{ + assert(inv.IsGenTxMsg()); + return {inv.IsMsgWtx(), inv.hash}; +} |