-
Notifications
You must be signed in to change notification settings - Fork 721
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 building of Alonzo transaction in Babbage era. #4166
Fix building of Alonzo transaction in Babbage era. #4166
Conversation
} = | ||
let !coinsPerUTxOWord = fromMaybe | ||
(error "toAlonzoPParams: must specify protocolParamUTxOCostPerWord or protocolParamUTxOCostPerByte") $ | ||
protocolParamUTxOCostPerWord <|> ((* 8) <$> protocolParamUTxOCostPerByte) |
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.
The conversion occurs here.
So in the interest of time we should probably let this through but we need a long term solution otherwise we will always be adding ad hoc fixes like this. What about the following for a long term solution: In the case of We:
We can check for the existence of the era relevant When we eventually call I think this is the path of least resistance as we avoid modifying |
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.
One minor adjustment then I will approve
@@ -119,6 +120,7 @@ import Cardano.Api.StakePoolMetadata | |||
import Cardano.Api.TxMetadata | |||
import Cardano.Api.Utils | |||
import Cardano.Api.Value | |||
import Control.Applicative ((<|>)) |
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.
This module should not be here
This is achieved by auto-converting from Babbage field protocolParamUTxOCostPerByte to Alonzo field protocolParamUTxOCostPerWord.
9df6bd6
to
51b9a22
Compare
bors r+ |
Build succeeded: |
This is achieved by auto-converting from Babbage field
protocolParamUTxOCostPerByte
to Alonzo fieldprotocolParamUTxOCostPerWord
, which is a multiplication by8
.Fixes #4164