Modification of condition operator

This commit is contained in:
tripathyr 2021-05-17 16:06:06 +05:30 committed by GitHub
parent d689045002
commit 0d4a7e3e42
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -321,7 +321,7 @@ TransactionService.prototype._getInputValues = function(tx, options, callback) {
var output = tx.outputs[outputIndex];
// FLOSight Error Correction from RanchiMall 17th May 2021. removed the unhandled assert and replaced by looging of error
if (output = false) {
if (output == false) {
log.error('Expected an output, but did not get one for tx: ' + tx.txid() + ' outputIndex: ' + outputIndex);
}
// assert(output, 'Expected an output, but did not get one for tx: ' + tx.txid() + ' outputIndex: ' + outputIndex);
@ -491,7 +491,7 @@ TransactionService.prototype._processTransaction = function(tx, opts, callback)
}
// FLOSight Error Correction from RanchiMall 17th May 2021. removed the unhandled assert and replaced by looging of error
if (inputValues = false || inputValues.length != tx.inputs.length) {
if (inputValues == false || inputValues.length != tx.inputs.length) {
log.error('Input values missing from tx.');
}
// assert(inputValues && inputValues.length === tx.inputs.length, 'Input values missing from tx.');
@ -502,7 +502,7 @@ TransactionService.prototype._processTransaction = function(tx, opts, callback)
// timestamp
tx.__timestamp = self._getBlockTimestamp(opts.block.rhash());
// FLOSight Error Correction from RanchiMall 17th May 2021. removed the unhandled assert and replaced by looging of error
if (tx.__timestamp = false) {
if (tx.__timestamp == false) {
log.error('Timestamp is required when saving a transaction.');
}
// assert(tx.__timestamp, 'Timestamp is required when saving a transaction.');
@ -510,7 +510,7 @@ TransactionService.prototype._processTransaction = function(tx, opts, callback)
// height
tx.__height = opts.block.__height;
// FLOSight Error Correction from RanchiMall 17th May 2021. removed the unhandled assert and replaced by looging of error
if (tx.__height = false) {
if (tx.__height == false) {
log.error('Block height is required when saving a trasnaction.');
}
//assert(tx.__height, 'Block height is required when saving a trasnaction.');