The check at txn_doublespend.py, line 113 passes, but should not.
Transaction doublespend
is created using gather_inputs
and does not debit account foo
. However, in the course of the test, account metadata is synced to doublespend
from introduced-then-conflicted tx1
, causing the test to pass.
The old test txnmall.sh checked that SyncMetaData
protected accounts from the effects of clones that had been received and possibly confirmed, by syncing metadata from the first-seen spend of an input, to all spends of that input.
The new test does not introduce a clone, but rather a true (non-clone) double-spend. SyncMetaData
does not define a clean mapping of accounts for conflicting transactions in general, and no such mapping is really possible. A conflict may respend several inputs, each of which had a different account in its first-spend.
I can commit an IsEquivalentTo
check to SyncMetaData
, so that only true clones have their metadata synced. This will cause the test to fail. The question is, how should the test be updated? What do we actually want to test regarding double-spends and accounts?
Ping @gavinandresen