-
Notifications
You must be signed in to change notification settings - Fork 214
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
Improve balanceTx error if UTxOAssumptions are broken #3994
base: master
Are you sure you want to change the base?
Conversation
0847f3c
to
ce8e012
Compare
@@ -277,6 +282,7 @@ data ErrSelectAssets | |||
|
|||
data ErrBalanceTxInternalError | |||
= ErrUnderestimatedFee W.Coin SealedTx KeyWitnessCount | |||
| ErrUTxOViolatesAssumptions UTxOAssumptionViolation |
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 is not actually an internal balanceTx error. In the HTTP API it is an internal wallet error, but not here, only looking at balanceTx. Will move.
Failing with:
Not sure it makes full sense to have to provide user-facing specifications for all the err500 errors 🤔 |
@@ -3041,7 +3099,8 @@ instance Arbitrary Wallet' where | |||
genShelleyVkAddr = Cardano.shelleyAddressInEra | |||
<$> (Cardano.makeShelleyAddress | |||
<$> genNetworkId | |||
<*> genPaymentCredential -- only vk credentials |
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.
Was also generating script credentials
@@ -2515,6 +2557,7 @@ balanceTransactionSpec = describe "balanceTransaction" $ do | |||
|
|||
wallet = mkTestWallet (utxo [Coin 5_000_000]) | |||
|
|||
|
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.
outs = map (TxOut dummyBootstrapAddr . TokenBundle.fromCoin) coins | ||
dummyHash = Hash $ B8.replicate 32 '0' | ||
|
||
|
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.
@@ -488,6 +489,8 @@ import qualified Cardano.Wallet.Primitive.Types.Tx.TxOut.Gen as TxOutGen | |||
import qualified Cardano.Wallet.Shelley.Compatibility as Compatibility | |||
import qualified Cardano.Wallet.Write.ProtocolParameters as Write | |||
import qualified Cardano.Wallet.Write.Tx as Write | |||
import Cardano.Wallet.Write.UTxOAssumptions | |||
( UTxOAssumptionViolation (UTxOAssumptionViolation) ) |
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.
wrong section
Comments
Issue Number
ADP-3056