Validator/authority contract (#3937)
* dir * simple validator list * stub validator contract * make the engine hold Weak<Client> instead of IoChannel * validator set factory * register weak client with ValidatorContract * check chain security * add address array to generator * register provider contract * update validator set on notify * add validator contract spec * simple list test * split update and contract test * contract change * use client in tendermint * fix deadlock * step duration in params * adapt tendermint tests * add storage fields to test spec * constructor spec * execute under wrong address * create under correct address * revert * validator contract constructor * move genesis block lookup * add removal ability to contract * validator contract adding validators * fix basic authority * validator changing test * more docs * update sync tests * remove env_logger * another env_logger * cameltoe * hold EngineClient instead of Client * add a comment about lock scope
This commit is contained in:
@@ -17,7 +17,7 @@
|
||||
//! Authority params deserialization.
|
||||
|
||||
use uint::Uint;
|
||||
use hash::Address;
|
||||
use super::ValidatorSet;
|
||||
|
||||
/// Authority params deserialization.
|
||||
#[derive(Debug, PartialEq, Deserialize)]
|
||||
@@ -29,7 +29,7 @@ pub struct AuthorityRoundParams {
|
||||
#[serde(rename="stepDuration")]
|
||||
pub step_duration: Uint,
|
||||
/// Valid authorities
|
||||
pub authorities: Vec<Address>,
|
||||
pub validators: ValidatorSet,
|
||||
/// Block reward.
|
||||
#[serde(rename="blockReward")]
|
||||
pub block_reward: Option<Uint>,
|
||||
@@ -57,7 +57,9 @@ mod tests {
|
||||
"params": {
|
||||
"gasLimitBoundDivisor": "0x0400",
|
||||
"stepDuration": "0x02",
|
||||
"authorities" : ["0xc6d9d2cd449a754c494264e1809c50e34d64562b"],
|
||||
"validators": {
|
||||
"list" : ["0xc6d9d2cd449a754c494264e1809c50e34d64562b"]
|
||||
},
|
||||
"blockReward": "0x50",
|
||||
"startStep" : 24
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user