From b2b6d5754e3cfa68b847939482b92ddb3048bc5a Mon Sep 17 00:00:00 2001 From: Neo Sun Date: Tue, 7 May 2024 12:56:42 +1200 Subject: [PATCH] Hotfix state channel spent > total --- contracts/StateChannel.sol | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/contracts/StateChannel.sol b/contracts/StateChannel.sol index 9168c880..9c205e22 100644 --- a/contracts/StateChannel.sol +++ b/contracts/StateChannel.sol @@ -379,8 +379,7 @@ contract StateChannel is Initializable, OwnableUpgradeable { require(isIndexer || isConsumer, 'G008'); // check state - bool allowState = query.spent >= state.spent && query.spent < state.total; - require(allowState, 'SC005'); + require(query.spent >= state.spent, 'SC005'); // check sign if (query.spent > 0) { @@ -421,7 +420,7 @@ contract StateChannel is Initializable, OwnableUpgradeable { require(msg.sender == state.indexer, 'G008'); } - // check count + // check state require(query.spent >= state.spent, 'SC005'); // check sign