Wallet side of the quick hack (oops)

This commit is contained in:
Mike Hearn
2011-12-27 23:14:11 +00:00
committed by Miron Cuperman
parent 5ce1d21e4c
commit 35ec0b669d

View File

@@ -679,6 +679,22 @@ public class Wallet implements Serializable {
return null;
}
/**
* Deletes transactions which appeared above the given block height from the wallet, but does not touch the keys.
* This is useful if you have some keys and wish to replay the block chain into the wallet in order to pick them up.
*/
public void clearTransactions(int fromHeight) {
if (fromHeight == 0) {
unspent.clear();
spent.clear();
pending.clear();
inactive.clear();
dead.clear();
} else {
throw new UnsupportedOperationException();
}
}
// This is used only for unit testing, it's an internal API.
enum Pool {
UNSPENT,