Transaction floData length limits
This commit is contained in:
parent
17af763417
commit
aeb784e398
@ -461,6 +461,16 @@ static bool AcceptToMemoryPoolWorker(const CChainParams& chainparams, CTxMemPool
|
||||
return state.DoS(0, false, REJECT_NONSTANDARD, "no-witness-yet", true);
|
||||
}
|
||||
|
||||
if (tx.nVersion >= 2) {
|
||||
int maxCommentLen = 528;
|
||||
if (witnessEnabled) {
|
||||
maxCommentLen = 1040;
|
||||
}
|
||||
if (tx.strFloData.length() > maxCommentLen) {
|
||||
return state.DoS(0, false, REJECT_INVALID, "flo-data-too-large");
|
||||
}
|
||||
}
|
||||
|
||||
// Rather not work on nonstandard transactions (unless -testnet/-regtest)
|
||||
std::string reason;
|
||||
if (fRequireStandard && !IsStandardTx(tx, reason, witnessEnabled))
|
||||
|
||||
Loading…
Reference in New Issue
Block a user