Fix segwit-related wallet bug #8664

pull sdaftuar wants to merge 1 commits into bitcoin:master from sdaftuar:segwit-wallet-bug changing 1 files +1 −0
  1. sdaftuar commented at 12:39 AM on September 5, 2016: member

    Reported by @jl2012.

    When we clear out the vin and vout in CWallet::CreateTransaction(), we also need to clear out the witness, or else the witness might have extra entries that trigger this assertion failure:

    bitcoind: ./primitives/transaction.h:326: void SerializeTransaction(TxType&, Stream&, Operation, int, int) [with Stream = CHashWriter; Operation = CSerActionSerialize; TxType = CTransaction]: Assertion `tx.wit.vtxinwit.size() <= tx.vin.size()' failed.
    

    Please tag for 0.13.1.

  2. Clear witness with vin/vout in CWallet::CreateTransaction() c40b034327
  3. fanquake added this to the milestone 0.13.1 on Sep 5, 2016
  4. fanquake added the label Wallet on Sep 5, 2016
  5. sipa commented at 9:53 AM on September 5, 2016: member

    utACK

  6. sipa added the label Needs backport on Sep 5, 2016
  7. gmaxwell commented at 12:45 AM on September 6, 2016: contributor

    ACK

  8. instagibbs commented at 5:33 PM on September 6, 2016: member

    ACK c40b034327bf8a30d3af1eeeef84bc4ccd57e685

  9. jl2012 commented at 5:15 PM on September 8, 2016: contributor

    ACK c40b034

  10. laanwj merged this on Sep 9, 2016
  11. laanwj closed this on Sep 9, 2016

  12. laanwj referenced this in commit 2abfe5956e on Sep 9, 2016
  13. btcdrak commented at 10:26 AM on September 9, 2016: contributor

    ACK c40b034

  14. luke-jr referenced this in commit 091cdebfb8 on Sep 21, 2016
  15. laanwj commented at 2:11 PM on September 26, 2016: member

    Backported in #8772, removing tag

  16. laanwj removed the label Needs backport on Sep 26, 2016
  17. MarcoFalke locked this on Sep 8, 2021
Labels

Milestone
0.13.1


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-14 12:15 UTC

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