Increase miner compatibility by allowing, but stripping unknown message values rather than rejecting as validation errors

This commit is contained in:
Benjamin Wilson
2025-04-19 13:51:16 -04:00
parent 0201703e35
commit 6cf1c225a4
2 changed files with 7 additions and 7 deletions
+2 -2
View File
@@ -33,8 +33,8 @@ async function bootstrap() {
new ValidationPipe({
transform: true,
whitelist: true,
forbidNonWhitelisted: true,
forbidUnknownValues: true
//forbidNonWhitelisted: true,
//forbidUnknownValues: true
}),
);
+5 -5
View File
@@ -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);