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({
|
new ValidationPipe({
|
||||||
transform: true,
|
transform: true,
|
||||||
whitelist: true,
|
whitelist: true,
|
||||||
forbidNonWhitelisted: true,
|
//forbidNonWhitelisted: true,
|
||||||
forbidUnknownValues: true
|
//forbidUnknownValues: true
|
||||||
}),
|
}),
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|||||||
@@ -132,7 +132,7 @@ export class StratumV1Client {
|
|||||||
|
|
||||||
const validatorOptions: ValidatorOptions = {
|
const validatorOptions: ValidatorOptions = {
|
||||||
whitelist: true,
|
whitelist: true,
|
||||||
forbidNonWhitelisted: true,
|
//forbidNonWhitelisted: true,
|
||||||
};
|
};
|
||||||
|
|
||||||
const errors = await validate(subscriptionMessage, validatorOptions);
|
const errors = await validate(subscriptionMessage, validatorOptions);
|
||||||
@@ -176,7 +176,7 @@ export class StratumV1Client {
|
|||||||
|
|
||||||
const validatorOptions: ValidatorOptions = {
|
const validatorOptions: ValidatorOptions = {
|
||||||
whitelist: true,
|
whitelist: true,
|
||||||
forbidNonWhitelisted: true,
|
//forbidNonWhitelisted: true,
|
||||||
};
|
};
|
||||||
|
|
||||||
const errors = await validate(configurationMessage, validatorOptions);
|
const errors = await validate(configurationMessage, validatorOptions);
|
||||||
@@ -214,7 +214,7 @@ export class StratumV1Client {
|
|||||||
|
|
||||||
const validatorOptions: ValidatorOptions = {
|
const validatorOptions: ValidatorOptions = {
|
||||||
whitelist: true,
|
whitelist: true,
|
||||||
forbidNonWhitelisted: true,
|
//forbidNonWhitelisted: true,
|
||||||
};
|
};
|
||||||
|
|
||||||
const errors = await validate(authorizationMessage, validatorOptions);
|
const errors = await validate(authorizationMessage, validatorOptions);
|
||||||
@@ -255,7 +255,7 @@ export class StratumV1Client {
|
|||||||
|
|
||||||
const validatorOptions: ValidatorOptions = {
|
const validatorOptions: ValidatorOptions = {
|
||||||
whitelist: true,
|
whitelist: true,
|
||||||
forbidNonWhitelisted: true,
|
//forbidNonWhitelisted: true,
|
||||||
};
|
};
|
||||||
|
|
||||||
const errors = await validate(suggestDifficultyMessage, validatorOptions);
|
const errors = await validate(suggestDifficultyMessage, validatorOptions);
|
||||||
@@ -300,7 +300,7 @@ export class StratumV1Client {
|
|||||||
|
|
||||||
const validatorOptions: ValidatorOptions = {
|
const validatorOptions: ValidatorOptions = {
|
||||||
whitelist: true,
|
whitelist: true,
|
||||||
forbidNonWhitelisted: true,
|
//forbidNonWhitelisted: true,
|
||||||
};
|
};
|
||||||
|
|
||||||
const errors = await validate(miningSubmitMessage, validatorOptions);
|
const errors = await validate(miningSubmitMessage, validatorOptions);
|
||||||
|
|||||||
Reference in New Issue
Block a user