From 9efd86a908cf09d9ddbadd3195f202635117d505 Mon Sep 17 00:00:00 2001 From: Pieter Wuille Date: Wed, 22 Jul 2020 17:17:00 -0700 Subject: refactor: add GenTxid (=txid or wtxid) type and use it for tx request logic --- src/protocol.cpp | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'src/protocol.cpp') diff --git a/src/protocol.cpp b/src/protocol.cpp index ee77ca3b9..5a91acee0 100644 --- a/src/protocol.cpp +++ b/src/protocol.cpp @@ -241,3 +241,9 @@ std::vector serviceFlagsToStr(uint64_t flags) return str_flags; } + +GenTxid ToGenTxid(const CInv& inv) +{ + assert(inv.IsGenTxMsg()); + return {inv.IsMsgWtx(), inv.hash}; +} -- cgit v1.2.3