From e50d405e3697965838497e24d5b9d5ad66b96cb4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Wei=C3=9Fer=20Hase?= Date: Mon, 19 Aug 2024 18:41:13 +0200 Subject: [PATCH] fix: compilation issues --- solidity/contracts/DataReceiver.sol | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/solidity/contracts/DataReceiver.sol b/solidity/contracts/DataReceiver.sol index 260bc60..890a277 100644 --- a/solidity/contracts/DataReceiver.sol +++ b/solidity/contracts/DataReceiver.sol @@ -59,19 +59,19 @@ contract DataReceiver is IDataReceiver, Governable { // NOTE: memory to storage is not supported // cachedObservations[_poolSalt][_poolNonce] = _observationsData; for (uint256 _i; _i < _observationsData.length; ++_i) { - cachedObservations[_poolSalt][_poolNonce].push(_observationsData[_i]); + _cachedObservations[_poolSalt][_poolNonce].push(_observationsData[_i]); } emit ObservationsCached(_poolSalt, _poolNonce, msg.sender); while (_currentNonce <= _poolNonce) { // Try backfilling pending observations (from current to {sent|first empty} nonce) - IOracleSidechain.ObservationData[] memory _cachedObservations = cachedObservations[_poolSalt][_currentNonce]; + IOracleSidechain.ObservationData[] memory _cache = _cachedObservations[_poolSalt][_currentNonce]; // If the struct is not empty, write it into the oracle - if (_cachedObservations.length > 0) { + if (_cache.length > 0) { // Since observation nonce == oracle nonce, we can safely write the observations - _oracle.write(_cachedObservations, _currentNonce); - emit ObservationsAdded(_poolSalt, _currentNonce, _cachedObservations, msg.sender); + _oracle.write(_cache, _currentNonce); + emit ObservationsAdded(_poolSalt, _currentNonce, _cache, msg.sender); // Clear out the written observations - delete cachedObservations[_poolSalt][_currentNonce]; + delete _cachedObservations[_poolSalt][_currentNonce]; _currentNonce++; } else { // When an empty nonce is found, break the loop