Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Serious bugs in validation.js #111

Closed
liuqixing opened this issue Jul 9, 2018 · 1 comment
Closed

Serious bugs in validation.js #111

liuqixing opened this issue Jul 9, 2018 · 1 comment

Comments

@liuqixing
Copy link

I found 5 calls can not be executed by the given callback function name, since I check code by running command ‘Inspect Code’ on WebStorm for file validation.js.
So, are those issues really bugs?
Thanks and look forward to you reply.

Details:

in function validateWitnesses(conn, objUnit, objValidationState, callback){ … }

-> at line 582, function ‘cb’ could not be found in this valid scope:
if (!chash.isChashValid(curr_witness))
return cb("witness address "+curr_witness+" is invalid");

in function validateMessage(conn, objMessage, message_index, objUnit, objValidationState, callback) { … }

-> at line 981, function ‘cb’ could not be found in this valid scope::
if ("address" in objSpendProof)
return cb("when single-authored, must not put address in spend proof");

-> at line 986, function ‘cb’ could not be found in this valid scope::
if (typeof objSpendProof.address !== "string")
return cb("when multi-authored, must put address in spend_proofs");

-> at line 988, function ‘cb’ could not be found in this valid scope::
if (arrAuthorAddresses.indexOf(objSpendProof.address) === -1)
return cb("spend proof address "+objSpendProof.address+" is not an author");

-> at line 993, function ‘cb’ could not be found in this valid scope::
if (objValidationState.arrInputKeys.indexOf(objSpendProof.spend_proof) >= 0)
return cb("spend proof "+objSpendProof.spend_proof+" already used");

@tonyofbyteball
Copy link
Member

Thanks, good catch, fixed now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants