mirror of
https://github.com/bitcoin/bitcoin.git
synced 2026-01-18 22:35:39 +01:00
Merge #8049: Expose information on whether transaction relay is enabled in getnetwork
1ab1dc3rpc: Add `relaytxes` flag to `getnetworkinfo` (Wladimir J. van der Laan)581ddffnet: Add fRelayTxes flag (Wladimir J. van der Laan)
This commit is contained in:
@@ -4800,7 +4800,7 @@ bool static ProcessMessage(CNode* pfrom, string strCommand, CDataStream& vRecv,
|
||||
return error("message inv size() = %u", vInv.size());
|
||||
}
|
||||
|
||||
bool fBlocksOnly = GetBoolArg("-blocksonly", DEFAULT_BLOCKSONLY);
|
||||
bool fBlocksOnly = !fRelayTxes;
|
||||
|
||||
// Allow whitelisted peers to send data other than blocks in blocks only mode if whitelistrelay is true
|
||||
if (pfrom->fWhitelisted && GetBoolArg("-whitelistrelay", DEFAULT_WHITELISTRELAY))
|
||||
@@ -4983,7 +4983,7 @@ bool static ProcessMessage(CNode* pfrom, string strCommand, CDataStream& vRecv,
|
||||
{
|
||||
// Stop processing the transaction early if
|
||||
// We are in blocks only mode and peer is either not whitelisted or whitelistrelay is off
|
||||
if (GetBoolArg("-blocksonly", DEFAULT_BLOCKSONLY) && (!pfrom->fWhitelisted || !GetBoolArg("-whitelistrelay", DEFAULT_WHITELISTRELAY)))
|
||||
if (!fRelayTxes && (!pfrom->fWhitelisted || !GetBoolArg("-whitelistrelay", DEFAULT_WHITELISTRELAY)))
|
||||
{
|
||||
LogPrint("net", "transaction sent in violation of protocol peer=%d\n", pfrom->id);
|
||||
return true;
|
||||
|
||||
Reference in New Issue
Block a user