Add storage mining pool to genesis and implement automatic reward redeeming (#4683)

* Add storage mining pool to genesis and implement automatic reward collection

* Address review comments
This commit is contained in:
Sagar Dhawan
2019-06-13 22:30:51 -07:00
committed by GitHub
parent ee68b9800e
commit 119467df59
9 changed files with 134 additions and 20 deletions

View File

@ -1,4 +1,5 @@
use crate::bank::Bank;
use solana_sdk::account::Account;
use solana_sdk::client::{AsyncClient, Client, SyncClient};
use solana_sdk::fee_calculator::FeeCalculator;
use solana_sdk::hash::Hash;
@ -95,6 +96,10 @@ impl SyncClient for BankClient {
Ok(self.bank.get_account(pubkey).map(|account| account.data))
}
fn get_account(&self, pubkey: &Pubkey) -> Result<Option<Account>> {
Ok(self.bank.get_account(pubkey))
}
fn get_balance(&self, pubkey: &Pubkey) -> Result<u64> {
Ok(self.bank.get_balance(pubkey))
}