Cleanup debug issues, corrects RPC server logic
This commit is contained in:
parent
cc4ccd4017
commit
2a2660ce62
@ -72,7 +72,6 @@ impl ValidatorService for ValidatorServiceInstance {
|
|||||||
};
|
};
|
||||||
|
|
||||||
// get the duties for each validator
|
// get the duties for each validator
|
||||||
dbg!(validators.get_public_keys());
|
|
||||||
for validator_pk in validators.get_public_keys() {
|
for validator_pk in validators.get_public_keys() {
|
||||||
let mut active_validator = ActiveValidator::new();
|
let mut active_validator = ActiveValidator::new();
|
||||||
|
|
||||||
@ -89,7 +88,6 @@ impl ValidatorService for ValidatorServiceInstance {
|
|||||||
return ctx.spawn(f);
|
return ctx.spawn(f);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
info!(self.log,""; "Public key" => format!("{:?}",public_key));
|
|
||||||
|
|
||||||
// get the validator index
|
// get the validator index
|
||||||
let val_index = match state.get_validator_index(&public_key) {
|
let val_index = match state.get_validator_index(&public_key) {
|
||||||
@ -102,7 +100,7 @@ impl ValidatorService for ValidatorServiceInstance {
|
|||||||
);
|
);
|
||||||
active_validator.set_none(false);
|
active_validator.set_none(false);
|
||||||
resp_validators.push(active_validator);
|
resp_validators.push(active_validator);
|
||||||
break;
|
continue;
|
||||||
}
|
}
|
||||||
// the cache is not built, throw an error
|
// the cache is not built, throw an error
|
||||||
Err(e) => {
|
Err(e) => {
|
||||||
@ -128,7 +126,7 @@ impl ValidatorService for ValidatorServiceInstance {
|
|||||||
);
|
);
|
||||||
active_validator.set_none(false);
|
active_validator.set_none(false);
|
||||||
resp_validators.push(active_validator);
|
resp_validators.push(active_validator);
|
||||||
break;
|
continue;
|
||||||
}
|
}
|
||||||
// the cache is not built, throw an error
|
// the cache is not built, throw an error
|
||||||
Err(e) => {
|
Err(e) => {
|
||||||
|
@ -120,7 +120,7 @@ impl TestingBeaconStateBuilder {
|
|||||||
})
|
})
|
||||||
.collect();
|
.collect();
|
||||||
|
|
||||||
let genesis_time = 1553740824; // arbitrary
|
let genesis_time = 1553753928; // arbitrary
|
||||||
|
|
||||||
let mut state = BeaconState::genesis(
|
let mut state = BeaconState::genesis(
|
||||||
genesis_time,
|
genesis_time,
|
||||||
|
@ -36,7 +36,7 @@ impl BeaconNode for ValidatorServiceClient {
|
|||||||
if !validator_duty.has_duty() {
|
if !validator_duty.has_duty() {
|
||||||
// validator is inactive
|
// validator is inactive
|
||||||
epoch_duties.insert(pubkeys[index].clone(), None);
|
epoch_duties.insert(pubkeys[index].clone(), None);
|
||||||
break;
|
continue;
|
||||||
}
|
}
|
||||||
// active validator
|
// active validator
|
||||||
let active_duty = validator_duty.get_duty();
|
let active_duty = validator_duty.get_duty();
|
||||||
|
Loading…
Reference in New Issue
Block a user