Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix segwit-related wallet bug #8664

Merged
merged 1 commit into from
Sep 9, 2016
Merged

Conversation

sdaftuar
Copy link
Member

@sdaftuar sdaftuar commented Sep 5, 2016

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.

@fanquake fanquake added this to the 0.13.1 milestone Sep 5, 2016
@fanquake fanquake added the Wallet label Sep 5, 2016
@sipa
Copy link
Member

sipa commented Sep 5, 2016

utACK

@gmaxwell
Copy link
Contributor

gmaxwell commented Sep 6, 2016

ACK

@instagibbs
Copy link
Member

ACK c40b034

@jl2012
Copy link
Contributor

jl2012 commented Sep 8, 2016

ACK c40b034

@laanwj laanwj merged commit c40b034 into bitcoin:master Sep 9, 2016
laanwj added a commit that referenced this pull request Sep 9, 2016
c40b034 Clear witness with vin/vout in CWallet::CreateTransaction() (Suhas Daftuar)
@btcdrak
Copy link
Contributor

btcdrak commented Sep 9, 2016

ACK c40b034

luke-jr pushed a commit to luke-jr/bitcoin that referenced this pull request Sep 21, 2016
@laanwj
Copy link
Member

laanwj commented Sep 26, 2016

Backported in #8772, removing tag

@bitcoin bitcoin locked as resolved and limited conversation to collaborators Sep 8, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

8 participants