[wallet] Verify unconfirmed transactions after syncing

Verify the unconfirmed transactions we download against the consensus
rules. This is currently exposed as an extra `verify` feature, since it
depends on a pre-release version of `bitcoinconsensus`.

Closes #352
This commit is contained in:
Alekos Filini
2021-05-27 16:58:42 +02:00
parent 476fa3fd7d
commit a186d82f9a
12 changed files with 228 additions and 2 deletions

View File

@@ -485,6 +485,7 @@ macro_rules! populate_test_db {
received: 0,
sent: 0,
confirmation_time,
verified: current_height.is_some(),
};
db.set_tx(&tx_details).unwrap();

View File

@@ -321,6 +321,7 @@ pub mod test {
timestamp: 123456,
height: 1000,
}),
verified: true,
};
tree.set_tx(&tx_details).unwrap();