mirror of
https://github.com/benjamin-wilson/public-pool.git
synced 2026-09-29 09:05:06 -07:00
Increase miner compatibility by allowing, but stripping unknown message values rather than rejecting as validation errors
This commit is contained in:
+2
-2
@@ -33,8 +33,8 @@ async function bootstrap() {
|
||||
new ValidationPipe({
|
||||
transform: true,
|
||||
whitelist: true,
|
||||
forbidNonWhitelisted: true,
|
||||
forbidUnknownValues: true
|
||||
//forbidNonWhitelisted: true,
|
||||
//forbidUnknownValues: true
|
||||
}),
|
||||
);
|
||||
|
||||
|
||||
@@ -133,7 +133,7 @@ export class StratumV1Client {
|
||||
|
||||
const validatorOptions: ValidatorOptions = {
|
||||
whitelist: true,
|
||||
forbidNonWhitelisted: true,
|
||||
//forbidNonWhitelisted: true,
|
||||
};
|
||||
|
||||
const errors = await validate(subscriptionMessage, validatorOptions);
|
||||
@@ -177,7 +177,7 @@ export class StratumV1Client {
|
||||
|
||||
const validatorOptions: ValidatorOptions = {
|
||||
whitelist: true,
|
||||
forbidNonWhitelisted: true,
|
||||
//forbidNonWhitelisted: true,
|
||||
};
|
||||
|
||||
const errors = await validate(configurationMessage, validatorOptions);
|
||||
@@ -215,7 +215,7 @@ export class StratumV1Client {
|
||||
|
||||
const validatorOptions: ValidatorOptions = {
|
||||
whitelist: true,
|
||||
forbidNonWhitelisted: true,
|
||||
//forbidNonWhitelisted: true,
|
||||
};
|
||||
|
||||
const errors = await validate(authorizationMessage, validatorOptions);
|
||||
@@ -254,7 +254,7 @@ export class StratumV1Client {
|
||||
|
||||
const validatorOptions: ValidatorOptions = {
|
||||
whitelist: true,
|
||||
forbidNonWhitelisted: true,
|
||||
//forbidNonWhitelisted: true,
|
||||
};
|
||||
|
||||
const errors = await validate(suggestDifficultyMessage, validatorOptions);
|
||||
@@ -299,7 +299,7 @@ export class StratumV1Client {
|
||||
|
||||
const validatorOptions: ValidatorOptions = {
|
||||
whitelist: true,
|
||||
forbidNonWhitelisted: true,
|
||||
//forbidNonWhitelisted: true,
|
||||
};
|
||||
|
||||
const errors = await validate(miningSubmitMessage, validatorOptions);
|
||||
|
||||
Reference in New Issue
Block a user