one day coinbase maturity (#1457)
* one day coinbase maturity * make one day maturity a soft fork
This commit is contained in:
committed by
Antioch Peverell
parent
63880f71c7
commit
c359c8aaf2
@@ -74,7 +74,7 @@ where
|
||||
);
|
||||
|
||||
let lock_height = if *is_coinbase {
|
||||
*height + global::coinbase_maturity()
|
||||
*height + global::coinbase_maturity(*height) // ignores on/off spendability around soft fork height
|
||||
} else {
|
||||
*height
|
||||
};
|
||||
|
||||
@@ -383,7 +383,7 @@ where
|
||||
let root_key_id = wallet.keychain().root_key_id();
|
||||
|
||||
let height = block_fees.height;
|
||||
let lock_height = height + global::coinbase_maturity();
|
||||
let lock_height = height + global::coinbase_maturity(height); // ignores on/off spendability around soft fork height
|
||||
let key_id = block_fees.key_id();
|
||||
|
||||
let (key_id, derivation) = match key_id {
|
||||
|
||||
@@ -90,7 +90,7 @@ fn basic_transaction_api(
|
||||
|
||||
// few values to keep things shorter
|
||||
let reward = core::consensus::REWARD;
|
||||
let cm = global::coinbase_maturity();
|
||||
let cm = global::coinbase_maturity(0); // assume all testing precedes soft fork height
|
||||
// mine a few blocks
|
||||
let _ = common::award_blocks_to_wallet(&chain, wallet1.clone(), 10);
|
||||
|
||||
@@ -288,7 +288,7 @@ fn tx_rollback(test_dir: &str, backend_type: common::BackendType) -> Result<(),
|
||||
|
||||
// few values to keep things shorter
|
||||
let reward = core::consensus::REWARD;
|
||||
let cm = global::coinbase_maturity();
|
||||
let cm = global::coinbase_maturity(0); // assume all testing precedes soft fork height
|
||||
// mine a few blocks
|
||||
let _ = common::award_blocks_to_wallet(&chain, wallet1.clone(), 5);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user