[Floonet] add feature for height locked kernels (#2168)
* add feature for height locked kernels * add function to compute kernel features appropriate for lock height, and use it * only sign kernel-features relevant fields; refactor Features * simplify invalid kernel logic * remove unused height arg to reward::output and run some rustfmt * replace nested if/else by match
This commit is contained in:
@@ -458,13 +458,7 @@ where
|
||||
|
||||
debug!("receive_coinbase: {:?}", block_fees);
|
||||
|
||||
let (out, kern) = reward::output(
|
||||
wallet.keychain(),
|
||||
&key_id,
|
||||
block_fees.fees,
|
||||
block_fees.height,
|
||||
)
|
||||
.unwrap();
|
||||
let (out, kern) = reward::output(wallet.keychain(), &key_id, block_fees.fees).unwrap();
|
||||
/* .context(ErrorKind::Keychain)?; */
|
||||
Ok((out, kern, block_fees))
|
||||
}
|
||||
|
||||
@@ -45,8 +45,8 @@ pub use self::{testclient::LocalWalletClient, testclient::WalletProxy};
|
||||
/// Get an output from the chain locally and present it back as an API output
|
||||
fn get_output_local(chain: &chain::Chain, commit: &pedersen::Commitment) -> Option<api::Output> {
|
||||
let outputs = [
|
||||
OutputIdentifier::new(OutputFeatures::DEFAULT_OUTPUT, commit),
|
||||
OutputIdentifier::new(OutputFeatures::COINBASE_OUTPUT, commit),
|
||||
OutputIdentifier::new(OutputFeatures::PLAIN, commit),
|
||||
OutputIdentifier::new(OutputFeatures::COINBASE, commit),
|
||||
];
|
||||
|
||||
for x in outputs.iter() {
|
||||
|
||||
Reference in New Issue
Block a user