net: Fix sent reject messages for blocks and transactions #7179
pull laanwj wants to merge 2 commits into bitcoin:master from laanwj:2015_12_fix_reject_message changing 5 files +123 −6-
laanwj commented at 1:58 pm on December 7, 2015: memberEver since we #5913 have been sending invalid reject messages for transactions and blocks.
-
net: Fix sent reject messages for blocks and transactions
Ever since we #5913 have been sending invalid reject messages for transactions and blocks.
-
laanwj added the label Needs backport on Dec 7, 2015
-
dcousens commented at 2:30 pm on December 7, 2015: contributorWorth adding a regression test?
-
laanwj commented at 2:47 pm on December 7, 2015: memberWould make sense.
-
laanwj commented at 9:40 am on December 8, 2015: member
To be clear, this solves the following issue:
Normal reject message
02015-12-07 20:16:52 peer=1096 Reject tx code 64: non-final: hash 54fae12b1dc553ec56137138ad28304569c9b3a69791fca5a02664b379a7d6ba
Reject message from 0.11.99+
02015-12-04 16:07:00 peer=322 Reject tx code 66: : hash 6e6f69746361736e617274206565726620646574696d696c20657461721d0000
Reason seems empty, and part of the reason message ends up in the “hash”. This is due to the reject code being sent as multiple bytes instead of one, misaligning the message.
Edit: trying to think of a test. Hopefully it could fit somewhere in the Python P2P test framework, without creating a new script.
-
laanwj added this to the milestone 0.12.0 on Dec 8, 2015
-
MarcoFalke commented at 9:47 am on December 8, 2015: memberutACK 9fc6ed6
-
laanwj commented at 4:15 pm on December 8, 2015: memberAdded basic tests for rejection of blocks and transactions. (tested that they pass with this patch, and fail without)
-
laanwj force-pushed on Dec 8, 2015
-
laanwj force-pushed on Dec 8, 2015
-
laanwj force-pushed on Dec 8, 2015
-
test: Add basic test for `reject` code
Extend P2P test framework to make it possible to expect reject codes for transactions and blocks.
-
laanwj force-pushed on Dec 9, 2015
-
sdaftuar commented at 10:18 am on December 9, 2015: memberSure, will take a look.
-
laanwj merged this on Dec 10, 2015
-
laanwj closed this on Dec 10, 2015
-
laanwj referenced this in commit 5dc63ed1ca on Dec 10, 2015
-
laanwj referenced this in commit 44fef99e66 on Dec 10, 2015
-
sdaftuar commented at 11:24 am on December 10, 2015: memberpost-merge ACK. The extension to the test framework seems like a good idea!
-
luke-jr referenced this in commit e08060dd84 on Jan 10, 2016
-
luke-jr referenced this in commit 3e167cfddd on Jan 10, 2016
-
laanwj commented at 8:08 am on February 4, 2016: memberThis is cherry-picked to 0.12 as 44fef99e666e85caa7616765412d7becf97ab673, removing needs backport label
-
laanwj removed the label Needs backport on Feb 4, 2016
-
zkbot referenced this in commit 19a8c45f42 on Aug 13, 2021
-
zkbot referenced this in commit 8e9f44cbe2 on Aug 13, 2021
-
zkbot referenced this in commit cf9a0799b4 on Aug 17, 2021
-
MarcoFalke locked this on Sep 8, 2021
laanwj
dcousens
MarcoFalke
sdaftuar
Milestone
0.12.0
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: 2024-11-25 00:12 UTC
More mirrored repositories can be found on mirror.b10c.me