mirror of
https://github.com/jwinterm/grin-wallet.git
synced 2026-10-17 15:21:39 +02:00
Store and use last scanned PMMR height in check_repair (#246)
* store last scanned PMMR check index * rustfmt * fix issue where account names will be overwritten on check_repair * rustfmt * attempts to include check_repair scan as part of normal update * rustfmt * fix error on restore due to incorrect parent key id being set * addition of calls to heigt_range_to_pmmr_indices traits and implementations * rustfmt * get_chain_height -> get_chain_tip * rustfmt * retrieve height+hash from node, modify check_repair to use block heights * rustfmt * fixes from live testing * rustfmt * test cleanup and change dependencies back to grin master * rustfmt
This commit is contained in:
+7
-1
@@ -1232,7 +1232,13 @@ where
|
||||
let w = w_lock.lc_provider()?.wallet_inst()?;
|
||||
// Test keychain mask, to keep API consistent
|
||||
let _ = w.keychain(keychain_mask)?;
|
||||
owner::node_height(&mut **w, keychain_mask)
|
||||
let mut res = owner::node_height(&mut **w, keychain_mask)?;
|
||||
if self.doctest_mode {
|
||||
// return a consistent hash for doctest
|
||||
res.header_hash =
|
||||
"d4b3d3c40695afd8c7760f8fc423565f7d41310b7a4e1c4a4a7950a66f16240d".to_owned();
|
||||
}
|
||||
Ok(res)
|
||||
}
|
||||
|
||||
// LIFECYCLE FUNCTIONS
|
||||
|
||||
@@ -1239,6 +1239,7 @@ pub trait OwnerRpc: Sync + Send {
|
||||
"jsonrpc": "2.0",
|
||||
"result": {
|
||||
"Ok": {
|
||||
"header_hash": "d4b3d3c40695afd8c7760f8fc423565f7d41310b7a4e1c4a4a7950a66f16240d",
|
||||
"height": "5",
|
||||
"updated_from_node": true
|
||||
}
|
||||
|
||||
@@ -1304,6 +1304,7 @@ pub trait OwnerRpcS {
|
||||
"jsonrpc": "2.0",
|
||||
"result": {
|
||||
"Ok": {
|
||||
"header_hash": "d4b3d3c40695afd8c7760f8fc423565f7d41310b7a4e1c4a4a7950a66f16240d",
|
||||
"height": "5",
|
||||
"updated_from_node": true
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user