From 7832c7b29c215ebc874e322fb38a17a64b8a2f51 Mon Sep 17 00:00:00 2001 From: Kosta Korenkov Date: Thu, 22 Aug 2019 14:49:10 +0200 Subject: [PATCH] fix forEach error with vm.logs --- src/tx/applyTx/checkSpendCond.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/tx/applyTx/checkSpendCond.js b/src/tx/applyTx/checkSpendCond.js index 8bbe3c3f..7694d63e 100644 --- a/src/tx/applyTx/checkSpendCond.js +++ b/src/tx/applyTx/checkSpendCond.js @@ -412,7 +412,7 @@ module.exports = async (state, tx, bridgeState, nodeConfig = {}) => { const logOuts = []; // iterate through all events - evmResult.vm.logs.forEach(log => { + (evmResult.vm.logs || []).forEach(log => { const originAddr = `0x${log[0].toString('hex')}`; const topics = log[1]; const data = log[2];