You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently there are three classes left in platform-core production code that are still using MerkleStateRoot class:
PlatformStateFacade. It casts State object to MerkleStateRoot to bypass normal access mechanism (via ReadableStates) because it's not initialized at the moment of invocation. Solution: we need to change the initialization so that we didn't have to do this direct access to Merkle tree node by index
SignedStateFileReader. registerServiceState uses MerkleStateRoot#putServiceStateIfAbsent.
There are two possible soltions:
putServiceStateIfAbsent can be elevated to State interface. This will require moving StateMetadata
registerServiceState can have a callback parameters passed by the hedera-app code
SignedStateFileWriter casts state to initialize time field:
if (state instanceof MerkleStateRoot merkleStateRoot) {
merkleStateRoot.setTime(platformContext.getTime());
}
It can be fixed by setting the time where it's more appropriate.
The text was updated successfully, but these errors were encountered:
Currently there are three classes left in
platform-core
production code that are still usingMerkleStateRoot
class:PlatformStateFacade
. It castsState
object toMerkleStateRoot
to bypass normal access mechanism (viaReadableStates
) because it's not initialized at the moment of invocation. Solution: we need to change the initialization so that we didn't have to do this direct access to Merkle tree node by indexSignedStateFileReader
.registerServiceState
usesMerkleStateRoot#putServiceStateIfAbsent
.There are two possible soltions:
putServiceStateIfAbsent
can be elevated toState
interface. This will require movingStateMetadata
registerServiceState
can have a callback parameters passed by thehedera-app
codeSignedStateFileWriter
castsstate
to initializetime
field:It can be fixed by setting the time where it's more appropriate.
The text was updated successfully, but these errors were encountered: