ead39153af
Fix #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 #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. |
||
---|---|---|
.. | ||
dbtest | ||
block.go | ||
boundary_test.go | ||
doc.go | ||
dup_test.go | ||
insertremove_test.go | ||
internal_test.go | ||
leveldb.go | ||
operational_test.go | ||
tx.go |