diff options
Diffstat (limited to 'src/main.h')
| -rw-r--r-- | src/main.h | 23 |
1 files changed, 14 insertions, 9 deletions
| @@ -48,13 +48,17 @@ extern CBlockIndex* pindexBest; | |||
| 48 | extern unsigned int nTransactionsUpdated; | 48 | extern unsigned int nTransactionsUpdated; |
| 49 | extern string strSetDataDir; | 49 | extern string strSetDataDir; |
| 50 | extern int nDropMessagesTest; | 50 | extern int nDropMessagesTest; |
| 51 | // Mining mode — persisted in wallet.dat | 51 | // Mining mode -- persisted in wallet.dat |
| 52 | // MINE_SOLO (0): mine to own wallet, no pool server | 52 | // Mining mode -- decided fresh every launch (CLI flags, else default). Never |
| 53 | // MINE_OPERATOR (1): run pool server, mine to own wallet, distribute to miners | 53 | // restored from wallet.dat; see LoadWallet() in db.cpp. |
| 54 | // MINE_PARTICIPANT (2): connect to external pool, submit shares, receive payouts | 54 | // MINE_RELAY (0): default. Node runs/syncs, never mines, no pool server. |
| 55 | #define MINE_SOLO 0 | 55 | // MINE_SOLO (1): mine to own wallet, no pool server |
| 56 | #define MINE_OPERATOR 1 | 56 | // MINE_OPERATOR (2): run pool server, mine to own wallet, distribute to miners |
| 57 | #define MINE_PARTICIPANT 2 | 57 | // MINE_PARTICIPANT (3): connect to external pool, submit shares, receive payouts |
| 58 | #define MINE_RELAY 0 | ||
| 59 | #define MINE_SOLO 1 | ||
| 60 | #define MINE_OPERATOR 2 | ||
| 61 | #define MINE_PARTICIPANT 3 | ||
| 58 | extern int nMineMode; | 62 | extern int nMineMode; |
| 59 | extern string strParticipantPool; // participant: pool .btf address | 63 | extern string strParticipantPool; // participant: pool .btf address |
| 60 | extern string strPoolName; // operator: announced pool name | 64 | extern string strPoolName; // operator: announced pool name |
| @@ -78,6 +82,7 @@ struct PoolWorkerStatView | |||
| 78 | uint64 totalShares; | 82 | uint64 totalShares; |
| 79 | uint64 roundShares; | 83 | uint64 roundShares; |
| 80 | int64 lastSeen; | 84 | int64 lastSeen; |
| 85 | double hashRate; // estimated H/s, derived from share difficulty + submit rate | ||
| 81 | }; | 86 | }; |
| 82 | 87 | ||
| 83 | // Settings | 88 | // Settings |
| @@ -102,11 +107,11 @@ void RelayWalletTransactions(); | |||
| 102 | bool LoadBlockIndex(bool fAllowNew=true); | 107 | bool LoadBlockIndex(bool fAllowNew=true); |
| 103 | void PrintBlockTree(); | 108 | void PrintBlockTree(); |
| 104 | bool BitcoinMiner(); | 109 | bool BitcoinMiner(); |
| 105 | void ThreadRPCServer(void* parg); // rpc.cpp — .btf pool server | 110 | void ThreadRPCServer(void* parg); // rpc.cpp -- .btf pool server |
| 106 | void GetParticipantMiningStats(uint64& sharesSent, uint64& sharesAccepted, double& hashRate); | 111 | void GetParticipantMiningStats(uint64& sharesSent, uint64& sharesAccepted, double& hashRate); |
| 107 | void SetParticipantMiningStatus(const std::string& status); | 112 | void SetParticipantMiningStatus(const std::string& status); |
| 108 | std::string GetParticipantMiningStatus(); | 113 | std::string GetParticipantMiningStatus(); |
| 109 | void GetPoolOperatorStats(int& authorizedMiners, int& blocksFound, uint64& roundShares); | 114 | void GetPoolOperatorStats(int& authorizedMiners, int& blocksFound, uint64& roundShares, double& totalHashRate); |
| 110 | void GetPoolWorkerStats(std::vector<PoolWorkerStatView>& out); | 115 | void GetPoolWorkerStats(std::vector<PoolWorkerStatView>& out); |
| 111 | void GetPendingPayouts(std::vector<PendingPayoutView>& out); | 116 | void GetPendingPayouts(std::vector<PendingPayoutView>& out); |
| 112 | bool ProcessMessages(CNode* pfrom); | 117 | bool ProcessMessages(CNode* pfrom); |