-
Notifications
You must be signed in to change notification settings - Fork 95
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
Fix execValidateBlock #1740
Fix execValidateBlock #1740
Conversation
ghost
commented
Sep 22, 2023
•
edited by ghost
Loading
edited by ghost
- To see the specific tasks where the Asana app for GitHub is being used, see below:
- https://app.asana.com/0/0/1205566925523368
40a3ac4
to
2eaf1de
Compare
d69c72e
to
dc1ac4b
Compare
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 could move the validateHashes check to the smart constructor, but I'm fine with this as it is too.
dc1ac4b
to
ea1efdd
Compare
src/Chainweb/Payload/PayloadStore.hs
Outdated
, _payloadWithOutputsTransactionsHash = txsHash | ||
, _payloadWithOutputsOutputsHash = outsHash | ||
} | ||
return $ newPayloadWithOutputs (_blockMinerData txs) (_blockCoinbaseOutput outs) (V.zip (_blockTransactions txs) (_blockOutputs outs)) |
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.
So we're recomputing the hashes now? Can we avoid that?
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.
Yep, by using the neighbour smart constructor payloadWithOutputs
.
tools/cwtool/TxSimulator.hs
Outdated
@@ -108,7 +108,9 @@ simulate sc@(SimConfig dbDir txIdx' _ _ cid ver gasLog doTypecheck) = do | |||
(_cpBeginCheckpointerBatch cp) | |||
(_cpDiscardCheckpointerBatch cp) $ case (txIdx',doTypecheck) of | |||
(Just txIdx,_) -> do -- single-tx simulation | |||
let PayloadWithOutputs txs md _ _ _ _ :: PayloadWithOutputs = head pwos | |||
let pwo :: PayloadWithOutputs = head pwos |
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.
Idk why this type annotation is here.
32ff584
to
8968cb9
Compare
@edmundnoble can we merge this one as well? |
8968cb9
to
fddafd0
Compare