mirror of
https://github.com/benjamin-wilson/public-pool.git
synced 2026-09-29 09:05:06 -07:00
optional DEV_FEE_ADDRESS
This commit is contained in:
+6
-4
@@ -8,12 +8,14 @@ BITCOIN_RPC_TIMEOUT=10000
|
|||||||
PORT=3333
|
PORT=3333
|
||||||
|
|
||||||
#optional telegram bot
|
#optional telegram bot
|
||||||
TELEGRAM_BOT_TOKEN=
|
#TELEGRAM_BOT_TOKEN=
|
||||||
|
|
||||||
#optional discord bot
|
#optional discord bot
|
||||||
DISCORD_BOT_CLIENTID=
|
#DISCORD_BOT_CLIENTID=
|
||||||
DISCORD_BOT_GUILD_ID=
|
#DISCORD_BOT_GUILD_ID=
|
||||||
DISCORD_BOT_CHANNEL_ID=
|
#DISCORD_BOT_CHANNEL_ID=
|
||||||
|
|
||||||
|
#optional
|
||||||
DEV_FEE_ADDRESS=
|
DEV_FEE_ADDRESS=
|
||||||
|
# mainnet | testnet
|
||||||
NETWORK=mainnet
|
NETWORK=mainnet
|
||||||
@@ -309,16 +309,17 @@ export class StratumV1Client extends EasyUnsubscribe {
|
|||||||
const hashRate = await this.clientStatisticsService.getHashRateForSession(this.clientAuthorization.address, this.clientAuthorization.worker, this.extraNonceAndSessionId);
|
const hashRate = await this.clientStatisticsService.getHashRateForSession(this.clientAuthorization.address, this.clientAuthorization.worker, this.extraNonceAndSessionId);
|
||||||
|
|
||||||
let payoutInformation;
|
let payoutInformation;
|
||||||
|
const devFeeAddress = this.configService.get('DEV_FEE_ADDRESS');
|
||||||
//50Th/s
|
//50Th/s
|
||||||
const noFee = hashRate < 50000000000000;
|
const noFee = hashRate < 50000000000000;
|
||||||
if (noFee) {
|
if (noFee || devFeeAddress == null || devFeeAddress.length < 1) {
|
||||||
payoutInformation = [
|
payoutInformation = [
|
||||||
{ address: this.clientAuthorization.address, percent: 100 }
|
{ address: this.clientAuthorization.address, percent: 100 }
|
||||||
];
|
];
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
payoutInformation = [
|
payoutInformation = [
|
||||||
{ address: this.configService.get('DEV_FEE_ADDRESS'), percent: 1.5 },
|
{ address: devFeeAddress, percent: 1.5 },
|
||||||
{ address: this.clientAuthorization.address, percent: 98.5 }
|
{ address: this.clientAuthorization.address, percent: 98.5 }
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user