- The tx entry from mapAlreadyAskedFor is erased as soon as it is received, and it doesn't enter the reject filter even though it's invalid, so we can immediately announce the transaction again and receive a getdata for that tx.
- An example transaction is being rejected due to premature witness, not size
Update p2p-segwit.py to reflect correct behavior #8528
pull instagibbs wants to merge 2 commits into bitcoin:master from instagibbs:rejectsw changing 1 files +7 −3-
instagibbs commented at 7:11 PM on August 16, 2016: member
-
Update p2p-segwit.py to reflect correct AskFor behavior bc1d1f2660
- instagibbs renamed this:
Update p2p-segwit.py to reflect correct AskFor behavior
Update p2p-segwit.py to reflect correct behavior
on Aug 16, 2016 - jonasschnelli added the label Tests on Aug 17, 2016
-
p2psegwit.py transaction is rejected due to premature witness not size 5547aeb015
-
in qa/rpc-tests/p2p-segwit.py:None in 66e0547df2 outdated
307 | tx3 = CTransaction() 308 | tx3.vin.append(CTxIn(COutPoint(tx2.sha256, 0), CScript([p2sh_program]))) 309 | tx3.vout.append(CTxOut(tx2.vout[0].nValue-1000, scriptPubKey)) 310 | tx3.wit.vtxinwit.append(CTxInWitness()) 311 | - tx3.wit.vtxinwit[0].scriptWitness.stack = [b'a'*400000] 312 | + tx3.wit.vtxinwit[0].scriptWitness.stack = [b'a']
sdaftuar commented at 2:01 PM on August 18, 2016:Ah, this code could be commented better I think. I did intend for the transaction to be too large for standardness rules, to ensure that we were checking for premature witness before doing the IsStandard check (that change was a recent bugfix). Perhaps just improve the comment, rather than change the test itself?
instagibbs commented at 2:05 PM on August 18, 2016:I'm not exactly clear what you were shooting for, so feel free to suggest new text?
sdaftuar commented at 2:30 PM on August 18, 2016:What do you think of this:
# We'll add an unnecessary witness to this transaction that would cause # it to be non-standard, to test that violating policy with a witness before # segwit activation doesn't blind a node to a transaction. Transactions # rejected for having a witness before segwit activation shouldn't be added # to the rejection cache.And then at line 312, add a comment:
# Note that this should be rejected for the premature witness reason, # rather than a policy check, since segwit hasn't activated yet.
instagibbs commented at 3:03 PM on August 18, 2016:sounds good, pushed
instagibbs force-pushed on Aug 18, 2016jonasschnelli added this to the milestone 0.13.1 on Aug 30, 2016jonasschnelli added the label Needs backport on Aug 30, 2016sdaftuar commented at 4:39 PM on September 9, 2016: memberutACK
btcdrak commented at 12:26 PM on September 12, 2016: contributorutACK 5547aeb
laanwj commented at 9:03 AM on September 13, 2016: memberutACK 5547aeb
laanwj merged this on Sep 13, 2016laanwj closed this on Sep 13, 2016laanwj referenced this in commit 4ced5de71d on Sep 13, 2016luke-jr referenced this in commit 3606b6b3a7 on Sep 21, 2016luke-jr referenced this in commit a114a0208b on Sep 21, 2016laanwj removed the label Needs backport on Sep 26, 2016DrahtBot locked this on Sep 8, 2021
github-metadata-mirror
This is a metadata mirror of the GitHub repository bitcoin/bitcoin. This site is not affiliated with GitHub. Content is generated from a GitHub metadata backup.
generated: 2026-04-27 03:16 UTC
This is a metadata mirror of the GitHub repository bitcoin/bitcoin. This site is not affiliated with GitHub. Content is generated from a GitHub metadata backup.
generated: 2026-04-27 03:16 UTC
This site is hosted by @0xB10C
More mirrored repositories can be found on mirror.b10c.me
More mirrored repositories can be found on mirror.b10c.me