Cleanup debug issues, corrects RPC server logic

This commit is contained in:
Age Manning 2019-03-28 17:22:09 +11:00
parent cc4ccd4017
commit 2a2660ce62
No known key found for this signature in database
GPG Key ID: 05EED64B79E06A93
3 changed files with 4 additions and 6 deletions

View File

@ -72,7 +72,6 @@ impl ValidatorService for ValidatorServiceInstance {
};
// get the duties for each validator
dbg!(validators.get_public_keys());
for validator_pk in validators.get_public_keys() {
let mut active_validator = ActiveValidator::new();
@ -89,7 +88,6 @@ impl ValidatorService for ValidatorServiceInstance {
return ctx.spawn(f);
}
};
info!(self.log,""; "Public key" => format!("{:?}",public_key));
// get the validator index
let val_index = match state.get_validator_index(&public_key) {
@ -102,7 +100,7 @@ impl ValidatorService for ValidatorServiceInstance {
);
active_validator.set_none(false);
resp_validators.push(active_validator);
break;
continue;
}
// the cache is not built, throw an error
Err(e) => {
@ -128,7 +126,7 @@ impl ValidatorService for ValidatorServiceInstance {
);
active_validator.set_none(false);
resp_validators.push(active_validator);
break;
continue;
}
// the cache is not built, throw an error
Err(e) => {

View File

@ -120,7 +120,7 @@ impl TestingBeaconStateBuilder {
})
.collect();
let genesis_time = 1553740824; // arbitrary
let genesis_time = 1553753928; // arbitrary
let mut state = BeaconState::genesis(
genesis_time,

View File

@ -36,7 +36,7 @@ impl BeaconNode for ValidatorServiceClient {
if !validator_duty.has_duty() {
// validator is inactive
epoch_duties.insert(pubkeys[index].clone(), None);
break;
continue;
}
// active validator
let active_duty = validator_duty.get_duty();