diff --git a/src/miner.rs b/src/miner.rs index 73827f1..7f5efda 100644 --- a/src/miner.rs +++ b/src/miner.rs @@ -38,7 +38,7 @@ use tracing_futures::Instrument; use tw_chain::primitives::asset::{Asset, TokenAmount}; use tw_chain::primitives::block::{self, BlockHeader}; use tw_chain::primitives::transaction::Transaction; -use tw_chain::utils::transaction_utils::{construct_tx_core, construct_tx_hash}; +use tw_chain::utils::transaction_utils::{construct_tx_core, construct_tx_hash, update_input_signatures}; /// Key for last pow coinbase produced pub const LAST_COINBASE_KEY: &str = "LastCoinbaseKey"; @@ -1414,6 +1414,10 @@ impl MinerNode { .await .unwrap(); + // Sign the inputs + let key_material = self.wallet_db.get_key_material(&tx_ins); + let tx_ins = update_input_signatures(&tx_ins, &tx_outs, &key_material); + // Aggregation address is last generated address, // which is generated by passing `None` as the `excess_address` // to `fetch_tx_ins_and_tx_outs_merge_input_addrs`