mirror of
https://github.com/bitcoin/bitcoin.git
synced 2026-03-05 20:49:19 +01:00
4c0d4f6f93refactor: interfaces, make 'createTransaction' less error-prone (furszy)e2c3ec9bf4refactor: move CreatedTransactionResult to types.h (furszy)45372175c3gui: remove AmountWithFeeExceedsBalance error special case (furszy) Pull request description: Bundle all function's outputs inside the `util::Result` returned object. Removals: - The input-output 'change_pos' ref arg from `createTransaction`, which has been a source of bugs in the past. - The 'fee' ref arg from `createTransaction`, which is currently only set when the transaction creation process succeeds. - The no longer needed `AmountWithFeeExceedsBalance` error (more info about its re-introduction at [bitcoin#25269](https://github.com/bitcoin/bitcoin/pull/25269) and [bitcoin#34299](https://github.com/bitcoin/bitcoin/pull/34299). Additionally, this PR moves the `CreatedTransactionResult` struct into its own file. This change is made to avoid further expanding the GUI dependencies on `wallet.h`. Structurally, the GUI should only access the model/interfaces and never the wallet directly. ACKs for top commit: stratospher: ACK4c0d4f6. hebasto: ACK4c0d4f6f93. Tree-SHA512: 4fc61f08ca2e66e46001defb3a2e852265713e75006c98f0c465bd48afe42e7b0d626d28d578741906fdd26e907d6919f06dc640c55c44efc3dfa766fdbf38a4