Implement test for merkle tree malleability in CPartialMerkleTree #5349

pull sipa wants to merge 1 commits into bitcoin:master from sipa:pmtmall changing 2 files +19 −2
  1. sipa commented at 2:46 PM on November 22, 2014: member

    This is a check that is mentioned in BIP 37, but never implemented in the reference code. As Bitcoin Core so far never decodes partial merkle trees, this is not a problem. But perhaps others use the code as a reference.

    Not intended for 0.10.

  2. mikehearn commented at 1:00 PM on November 24, 2014: contributor

    Yes, bitcoinj uses a completely straight line translation of your code to Java. Equivalent commit is here:

    https://github.com/bitcoinj/bitcoinj/commit/bd986f35f10aa28299b8a9b5e4633cb437b013f7

    Thanks! Also thanks to Matt for pointing this pull req out to me.

  3. sipa commented at 2:19 PM on November 24, 2014: member

    @mikehearn Heh, good that you notice. I was convinced that BitcoinJ actually implemented the rule as written in the BIP (on the other hand, until recently I was also convinced that Bitcoin Core implemented it too).

  4. TheBlueMatt commented at 10:03 PM on November 24, 2014: member

    @sipa you underestimate my laziness, then :)

  5. laanwj added the label Tests on Nov 28, 2014
  6. Implement test for merkle tree malleability in CPartialMerkleTree
    This is a check that is mentioned in BIP 37, but never implemented in the
    reference code. As Bitcoin Core so far never decodes partial merkle trees,
    this is not a problem. But perhaps others use the code as a reference.
    012598880c
  7. sipa force-pushed on Dec 11, 2014
  8. sipa commented at 4:25 PM on December 11, 2014: member

    Rebased.

  9. laanwj commented at 6:21 PM on December 11, 2014: member

    Tested ACK commithash 012598880cf69a6a4d4d495c78e40ab4abb4eb39 pull #5349 (signature)

  10. laanwj merged this on Jan 2, 2015
  11. laanwj closed this on Jan 2, 2015

  12. laanwj referenced this in commit f55c5e9749 on Jan 2, 2015
  13. MarcoFalke 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-19 09:15 UTC

This site is hosted by @0xB10C
More mirrored repositories can be found on mirror.b10c.me