mirror of
https://github.com/benjamin-wilson/public-pool.git
synced 2026-09-29 09:05:06 -07:00
some changes for docker setup (#9)
* added SIGTERM handler for graceful docker shutdown * added error message * added example for bitcoind running on the host undockered * added docker-compose and extended example * added docker-compose section to README * addes some note for rpcallowip * added restart policy * added DB folder for persistent data * added $NETWORK as prefix for database path to not get in conflict with testnet setup * used env variables for stratum and api ports
This commit is contained in:
@@ -37,7 +37,7 @@ export class BitcoinRpcService {
|
||||
this.pollMiningInfo();
|
||||
} else {
|
||||
setInterval(this.pollMiningInfo.bind(this), 500);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public async pollMiningInfo() {
|
||||
@@ -60,7 +60,7 @@ export class BitcoinRpcService {
|
||||
}
|
||||
});
|
||||
} catch (e) {
|
||||
console.log('Error getblocktemplate');
|
||||
console.error('Error getblocktemplate:' ,e.message);
|
||||
throw new Error('Error getblocktemplate');
|
||||
}
|
||||
console.log(`getblocktemplate tx count: ${result.transactions.length}`);
|
||||
@@ -71,7 +71,7 @@ export class BitcoinRpcService {
|
||||
try {
|
||||
return await this.client.getmininginfo();
|
||||
} catch (e) {
|
||||
console.log('Error getmininginfo');
|
||||
console.error('Error getmininginfo', e.message);
|
||||
return null;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user