expose "wallet info" on CLI (#132)
* expose "wallet info" on CLI * add sleep and retry logic when obtaining wallet.lock * fix pool test for immature coinbase
This commit is contained in:
committed by
Ignotus Peverell
parent
a5b2c7d3f2
commit
670aa11e5a
@@ -132,7 +132,10 @@ impl<T> ApiEndpoint for PoolApi<T>
|
||||
.write()
|
||||
.unwrap()
|
||||
.add_to_memory_pool(source, tx)
|
||||
.map_err(|e| Error::Internal(format!("Addition to transaction pool failed: {:?}", e)))?;
|
||||
.map_err(|e| {
|
||||
Error::Internal(format!("Addition to transaction pool failed: {:?}", e))
|
||||
})?;
|
||||
|
||||
Ok(())
|
||||
}
|
||||
}
|
||||
|
||||
+3
-3
@@ -58,9 +58,9 @@ pub struct Output {
|
||||
|
||||
impl Output {
|
||||
pub fn from_output(output: &core::Output, block_header: &core::BlockHeader) -> Output {
|
||||
let (output_type, maturity) = match output.features {
|
||||
let (output_type, lock_height) = match output.features {
|
||||
x if x.contains(core::transaction::COINBASE_OUTPUT) => {
|
||||
(OutputType::Coinbase, consensus::COINBASE_MATURITY)
|
||||
(OutputType::Coinbase, block_header.height + consensus::COINBASE_MATURITY)
|
||||
},
|
||||
_ => (OutputType::Transaction, 0),
|
||||
};
|
||||
@@ -69,7 +69,7 @@ impl Output {
|
||||
commit: output.commit,
|
||||
proof: output.proof,
|
||||
height: block_header.height,
|
||||
lock_height: block_header.height + maturity,
|
||||
lock_height: lock_height,
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user