Commit some new networking code, adding integration, broker still not 100%, hasn't been committed
This commit is contained in:
parent
1af6d56e2d
commit
050e69e23f
18 changed files with 1829 additions and 359 deletions
|
@ -6,17 +6,23 @@ const outputValidation = {
|
|||
};
|
||||
|
||||
function validateOutputs(t) {
|
||||
if (!ChainUtil.validateArray(t, function (output) {
|
||||
return ChainUtil.validateObject(output, outputValidation).result;
|
||||
})) {
|
||||
return false;
|
||||
let validateRes = ChainUtil.validateArray(t, function (output) {
|
||||
return ChainUtil.validateObject(output, outputValidation);
|
||||
});
|
||||
if (!validateRes.result) {
|
||||
return validateRes
|
||||
}
|
||||
|
||||
if (t.length <= 0) {
|
||||
return false;
|
||||
return {
|
||||
result: false,
|
||||
reason: "Outputs length isn't positive"
|
||||
};
|
||||
}
|
||||
|
||||
return true;
|
||||
return {
|
||||
result: true
|
||||
};
|
||||
}
|
||||
|
||||
const baseValidation = {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue