New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Seath first steps continue #17
Seath first steps continue #17
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pending to complete
-- logInfo' $ "submited: " <> show transactionId | ||
pure $ transactionId | ||
|
||
newtype BlockhainState = BlockhainState | ||
{ leaderUTXOs :: Maybe UtxoMap |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why is it a maybe? if can't get the map we can use a empty map here.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hmm, didn't think about that. I just used the same type that getWalletUtxos
from CTL returns, but not sure atm what is the case for Notning
there.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
for getWalletUxos
make sense since is different not having any UTxO
than failing to query it. In this case we control if there are UTxOs
in the leader, if we can't get them, we did something wrong.
-- logInfo' $ "submited: " <> show transactionId | ||
pure $ transactionId | ||
|
||
newtype BlockhainState = BlockhainState | ||
{ leaderUTXOs :: Maybe UtxoMap | ||
, usersUTXOs :: Array (Maybe UtxoMap) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
same as with the leader
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Also I'm still of the opinion to put optionally names to the users or at least fix their index in the array to have a short reference while debugging (it was incredible useful to debug why seath was failing)
checkScriptState bchState | ||
|
||
where | ||
checlLeaderUtxos bchState = do |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
we also need a check that we aren't changing the leader utxos.
In the future when we add the fee for the leader, this would be broken, but as the fee mechanism is not clear right now, having this test is good for now.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe we can make something more general like assertState
where we can pass predicates and check intermediate states also.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yes, we definitely want something like that and also integrate the tests using mote.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Made separate issue for this - #20
Added:
Modified: