allow permanent unlock for internal sealing

This commit is contained in:
keorn 2016-11-04 15:50:56 +00:00
parent 0e5060db18
commit a8b688b469
2 changed files with 4 additions and 2 deletions

View File

@ -212,7 +212,8 @@ pub struct Miner {
sealing_block_last_request: Mutex<u64>,
// for sealing...
options: MinerOptions,
seals_internally: bool,
/// Does the node perform internal (without work) sealing.
pub seals_internally: bool,
gas_range_target: RwLock<(U256, U256)>,
author: RwLock<Address>,

View File

@ -190,7 +190,8 @@ pub fn setup_rpc<T: Extendable>(server: T, deps: Arc<Dependencies>, apis: ApiSet
}
},
Api::PersonalAccounts => {
server.add_delegate(PersonalAccountsClient::new(&deps.secret_store, &deps.client, &deps.miner, deps.geth_compatibility).to_delegate());
let enable_permanent_unlock = deps.geth_compatibility || deps.miner.seals_internally;
server.add_delegate(PersonalAccountsClient::new(&deps.secret_store, &deps.client, &deps.miner, enable_permanent_unlock).to_delegate());
},
Api::PersonalSafe => {
server.add_delegate(PersonalClient::new(&deps.secret_store, &deps.client).to_delegate());