GetVirtualTransactionSize(CTransaction&)
passes by default 0 sigops and 0 -bytespersigop
, which is incorrect. In many cases (ie, wallet), this is harmless since we have control over the transactions and don’t do anything absurd in normal usage. But in other cases (including wallet received transactions), this isn’t safe. To avoid invisible bugs like this, I delete (or rather, move to bitcoin_test
) the function signature that allows for omitting sigop inputs.
This also then fixes the new package relay code to use the correct virtual sizes for its checks, and documents calling locations where the behaviour is broken or safe.
In particular, note that the sendrawtransaction
RPC and GUI transaction details remain buggy and not fixed in this PR.