-
Notifications
You must be signed in to change notification settings - Fork 2.4k
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
"searchrawtransactions" returns duplicates of transactions #346
Comments
@Roasbeef: Please take a look at this one. |
Merged
aakselrod
added a commit
to aakselrod/btcd
that referenced
this issue
Mar 20, 2015
Fix btcsuite#303 by changing the addrindex key prefix to 3 characters so that it's easy to check length when dropping the index. To drop the old index, check to make sure we aren't dropping any entries that end in "sx" or "tx" as those aren't part of the addrindex. Fix btcsuite#346 by changing the pointers in the mempool's addrindex map to wire.ShaHash 32-byte values. This lets them be deleted even if the transaction data changes places in memory upon expanding the maps. Change the way addrindex uint32s are stored to big-endian in order to sort the transactions on disk in chronological/dependency order. Change the "searchrawtransactions" RPC call to return transactions from the database before the memory pool so that they're returned in order. This commit DOES NOT do topological sorting of the memory pool transactions to ensure they're returned in dependency order. This may be a good idea for a future enhancement. Add addrindex versioning to automatically drop the old/incompatible version of the index and rebuild with the new sort method and key prefix.
aakselrod
added a commit
to aakselrod/btcd
that referenced
this issue
Mar 20, 2015
Fix btcsuite#303 by changing the addrindex key prefix to 3 characters so that it's easy to check length when dropping the index. To drop the old index, check to make sure we aren't dropping any entries that end in "sx" or "tx" as those aren't part of the addrindex. Update test to deal with the new prefix length. Fix btcsuite#346 by changing the pointers in the mempool's addrindex map to wire.ShaHash 32-byte values. This lets them be deleted even if the transaction data changes places in memory upon expanding the maps. Change the way addrindex uint32s are stored to big-endian in order to sort the transactions on disk in chronological/dependency order. Change the "searchrawtransactions" RPC call to return transactions from the database before the memory pool so that they're returned in order. This commit DOES NOT do topological sorting of the memory pool transactions to ensure they're returned in dependency order. This may be a good idea for a future enhancement. Add addrindex versioning to automatically drop the old/incompatible version of the index and rebuild with the new sort method and key prefix.
aakselrod
added a commit
to aakselrod/btcd
that referenced
this issue
Mar 23, 2015
Fix btcsuite#303 by changing the addrindex key prefix to 3 characters so that it's easy to check length when dropping the index. To drop the old index, check to make sure we aren't dropping any entries that end in "sx" or "tx" as those aren't part of the addrindex. Update test to deal with the new prefix length. Fix btcsuite#346 by changing the pointers in the mempool's addrindex map to wire.ShaHash 32-byte values. This lets them be deleted even if the transaction data changes places in memory upon expanding the maps. Change the way addrindex uint32s are stored to big-endian in order to sort the transactions on disk in chronological/dependency order. Change the "searchrawtransactions" RPC call to return transactions from the database before the memory pool so that they're returned in order. This commit DOES NOT do topological sorting of the memory pool transactions to ensure they're returned in dependency order. This may be a good idea for a future enhancement. Add addrindex versioning to automatically drop the old/incompatible version of the index and rebuild with the new sort method and key prefix.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
While btcd was running, I broadcast two transactions: ba1eecb28b363f40ee8ad4796989c8eb3d552e8ab85c146fac00d161147dbf1d and 271c05315790682c964d9ab29d3e84cc79a8f0d80bf6acf638186ce36ea780ae (not through the same btcd I'm querying).
After the transactions got confirmed, I am seeing something like the blockquote below. It looks like transactions may not be getting removed from
txMemPool.addrindex
when they're confirmed in a block, because the duplicate 0-confirm transactions go away after restarting btcd.If I get a chance soon, I will try and see why this is happening/try to fix it.
The text was updated successfully, but these errors were encountered: