mirror of
https://github.com/benjamin-wilson/public-pool.git
synced 2025-04-13 14:29:24 +02:00
optional DEV_FEE_ADDRESS
This commit is contained in:
parent
b300b82130
commit
59ccc2cf2c
10
.env.example
10
.env.example
@ -8,12 +8,14 @@ BITCOIN_RPC_TIMEOUT=10000
|
||||
PORT=3333
|
||||
|
||||
#optional telegram bot
|
||||
TELEGRAM_BOT_TOKEN=
|
||||
#TELEGRAM_BOT_TOKEN=
|
||||
|
||||
#optional discord bot
|
||||
DISCORD_BOT_CLIENTID=
|
||||
DISCORD_BOT_GUILD_ID=
|
||||
DISCORD_BOT_CHANNEL_ID=
|
||||
#DISCORD_BOT_CLIENTID=
|
||||
#DISCORD_BOT_GUILD_ID=
|
||||
#DISCORD_BOT_CHANNEL_ID=
|
||||
|
||||
#optional
|
||||
DEV_FEE_ADDRESS=
|
||||
# mainnet | testnet
|
||||
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);
|
||||
|
||||
let payoutInformation;
|
||||
const devFeeAddress = this.configService.get('DEV_FEE_ADDRESS');
|
||||
//50Th/s
|
||||
const noFee = hashRate < 50000000000000;
|
||||
if (noFee) {
|
||||
if (noFee || devFeeAddress == null || devFeeAddress.length < 1) {
|
||||
payoutInformation = [
|
||||
{ address: this.clientAuthorization.address, percent: 100 }
|
||||
];
|
||||
|
||||
} else {
|
||||
payoutInformation = [
|
||||
{ address: this.configService.get('DEV_FEE_ADDRESS'), percent: 1.5 },
|
||||
{ address: devFeeAddress, percent: 1.5 },
|
||||
{ address: this.clientAuthorization.address, percent: 98.5 }
|
||||
];
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user