dgenr8
commented at 1:22 AM on March 12, 2015:
contributor
The first commit illustrates a problem with the current txn_doublespend.py test. The test relies on unsupportable behavior in the wallet's SyncMetaData method. The test is made to produce inconsistent results by making a small change to specific test "amount" parameters.
The second commit introduces a primitive method CTransaction::IsEquivalentTo and uses it in the wallet to ensure that SyncMetaData is only called for malleability clones, not general conflict (doublespend) transactions. This makes the output of the illustrative version of txn_doublespend.py consistent and predictable.
The third commit is a revised txn_doublespend.py test that does not rely on broken SyncMetaData. Instead, it expects the fixed version of SyncMetaData. It also removes a dependency on the soon-to-be-deprecated accounting "move" method.
jonasschnelli
commented at 7:30 AM on March 12, 2015:
contributor
utACK.
Travis fails test_bitcoin: chainparams.cpp:286: const CChainParams& Params(): Assertion 'pCurrentParams' failed..
You probably need to rebase because there was a travis error after a certain commit on master.
gavinandresen
commented at 8:28 PM on March 18, 2015:
contributor
I don't like the new unit test-- you are testing the new "" account gets debited on a non-malleated doublespend.
But our wallet code will never produce a non-malleated double-spend (at least not without the user jumping through some hoops to copy the wallet to two machines, etc etc etc).
I'd be happier if the new unit test tested the new code, and created a malleated version of the spend-to-foo and made sure The Right Thing happened.
I'm also uncertain about changing the SyncMetaData behavior to only work for malleated transactions, but I think I can live with that (mostly because what you get depends on the order your node sees transactions, accounts are being deprecated, and non-malleated double-spends of a "spendfrom" should never happen unless you jump through hoops).
dgenr8 force-pushed on Mar 24, 2015
dgenr8 force-pushed on Mar 24, 2015
dgenr8
commented at 4:28 AM on March 24, 2015:
contributor
Define CTransaction::IsEquivalentTo(const CTransaction& tx)
True if only scriptSigs are different. In other words, true if
the two transactions are malleability clones. In other words,
true if the two transactions have the same effect on the
outside universe.
In the wallet, only SyncMetaData for equivalent transactions.
b2b3619262
Better txn_doublespend.py test
Remove reliance on accounting "move" ledger entries. Instead,
create funding transactions (and deal with fee complexities).
Do not rely on broken SyncMetaData. Instead expect double-spend
amount to be debited from the default "" account.
defd2d55b7
dgenr8 force-pushed on Apr 12, 2015
dgenr8
commented at 2:35 AM on April 12, 2015:
contributor
laanwj
commented at 10:34 AM on April 15, 2015:
member
ACK on new test, for discussion with regard to adding a field to createrawtransaction RPC see #5936
laanwj added the label Tests on Apr 15, 2015
dgenr8 force-pushed on May 12, 2015
dgenr8
commented at 12:08 AM on May 12, 2015:
contributor
Removed the change to createrawtransaction.
Add txn_clone.py test
Does what the old txnmall.sh test did.
Creates an equivalent malleated clone and tests that SyncMetaData
syncs the accounting effects from the original transaction to the
confirmed clone.
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-05-20 06:55 UTC