mirror of
https://github.com/benjamin-wilson/public-pool.git
synced 2025-03-27 02:02:10 +01:00
update best difficulty
This commit is contained in:
parent
0b07992365
commit
8d7dacf4b1
@ -158,7 +158,7 @@ export class MiningJob {
|
||||
const addressInfo = getAddressInfo(address);
|
||||
switch (addressInfo.type) {
|
||||
case AddressType.p2wpkh: {
|
||||
return bitcoinjs.payments.p2wpkh({ address, network: bitcoinjs.networks.testnet }).output;
|
||||
return bitcoinjs.payments.p2wpkh({ address }).output;
|
||||
}
|
||||
case AddressType.p2pkh: {
|
||||
return bitcoinjs.payments.p2pkh({ address }).output;
|
||||
|
@ -353,11 +353,11 @@ export class StratumV1Client extends EasyUnsubscribe {
|
||||
'Duplicate share').response();
|
||||
console.error(err);
|
||||
await this.promiseSocket.write(err);
|
||||
}
|
||||
|
||||
if (submissionDifficulty > this.entity.bestDifficulty) {
|
||||
await this.clientService.updateBestDifficulty(this.extraNonce, submissionDifficulty);
|
||||
this.entity.bestDifficulty = submissionDifficulty;
|
||||
}
|
||||
if (submissionDifficulty > this.entity.bestDifficulty) {
|
||||
await this.clientService.updateBestDifficulty(this.extraNonce, submissionDifficulty);
|
||||
this.entity.bestDifficulty = submissionDifficulty;
|
||||
}
|
||||
|
||||
} else {
|
||||
|
Loading…
x
Reference in New Issue
Block a user