Small changes

This commit is contained in:
Jordi Baylina 2018-12-22 23:51:10 +01:00
parent 291b3cedc8
commit 8a594dc942
No known key found for this signature in database
GPG Key ID: 7480C80C1BE43112
2 changed files with 6 additions and 0 deletions

View File

@ -473,6 +473,10 @@ wBigInt.leInt2Buff = function(n, len) {
return buff; return buff;
}; };
wBigInt.prototype.leInt2Buff = function (len) {
return wBigInt.leInt2Buff(this,len);
};
module.exports = wBigInt; module.exports = wBigInt;

View File

@ -45,6 +45,8 @@ function calculateWitness(circuit, inputSignals, log) {
for (let s in inputSignals) { for (let s in inputSignals) {
ctx.currentComponent = "main"; ctx.currentComponent = "main";
iterateSelector(inputSignals[s], [], function(selector, value) { iterateSelector(inputSignals[s], [], function(selector, value) {
console.log("xxxx");
if (typeof(value) == "undefined") throw new Error("Signal not defined:" + s);
ctx.setSignal(s, selector, bigInt(value)); ctx.setSignal(s, selector, bigInt(value));
}); });
} }