refactor: add GenTxid (=txid or wtxid) type and use it for tx request logic

This commit is contained in:
Pieter Wuille
2020-07-22 17:17:00 -07:00
parent d362f19355
commit 9efd86a908
4 changed files with 42 additions and 17 deletions

View File

@@ -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};
}