Add storage point tracking and tie in storage rewards to economics (#4824)

* Add storage point tracking and tie in storage rewards to epochs and economics

* Prevent validators from updating their validations for a segment

* Fix test

* Retain syscall scoping for readability

* Update Credits to own epoch tracking
This commit is contained in:
Sagar Dhawan
2019-06-26 10:40:03 -07:00
committed by GitHub
parent 8a64e1ddc3
commit df1c473341
9 changed files with 318 additions and 123 deletions

View File

@ -338,11 +338,8 @@ impl Replicator {
let client = crate::gossip_service::get_client(&nodes);
if let Ok(Some(account)) = client.get_account(&self.storage_keypair.pubkey()) {
if let Ok(StorageContract::ReplicatorStorage {
reward_validations, ..
}) = account.state()
{
if !reward_validations.is_empty() {
if let Ok(StorageContract::ReplicatorStorage { validations, .. }) = account.state() {
if !validations.is_empty() {
let ix = storage_instruction::claim_reward(
&self.keypair.pubkey(),
&self.storage_keypair.pubkey(),