Write witness caches when writing the best block
For steady-state operation, this reduces the average time between wallet disk writes from once per block to once per hour. On -rescan, witness caches are only written out at the end along with the best block, increasing speed while ensuring that on-disk state is kept consistent. Witness caches are now never recreated during a -reindex, on the assumption that the blocks themselves are not changing (the chain is just being reconstructed), and so the witnesses will remain valid. Part of #1749.
This commit is contained in:
@@ -200,6 +200,10 @@ struct CBlockLocator
|
||||
{
|
||||
return vHave.empty();
|
||||
}
|
||||
|
||||
friend bool operator==(const CBlockLocator& a, const CBlockLocator& b) {
|
||||
return (a.vHave == b.vHave);
|
||||
}
|
||||
};
|
||||
|
||||
#endif // BITCOIN_PRIMITIVES_BLOCK_H
|
||||
|
||||
Reference in New Issue
Block a user