# Gavin Andresen # 2011-03-17 01:31:58 # https://bitcointalk.org/index.php?topic=4534.msg66573#msg66573 Very nice! @p{par} The 'sig opcount @p{lt}= 2' rule for tx relaying is slated to change with the 'sendmany' patch I pulled on Monday. @p{par} The new rule will be 'sig opcount @p{lt}= size/34 @p{par} Code: // Checking ECDSA signatures is a CPU bottleneck, so to avoid denial-of-service @p{brk} // attacks disallow transactions with more than one SigOp per 34 bytes. @p{brk} // 34 bytes because a TxOut is: @p{brk} // 20-byte address + 8 byte bitcoin amount + 5 bytes of ops + 1 byte script length @p{brk} if (GetSigOpCount() @s{gt} nSize / 34 || nSize @p{lt} 100) @p{brk} @p{(tt} @p{??)}return error("AcceptToMemoryPool() : nonstandard transaction"); @p{brk}