Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: exit logic for pre-mine spend (#6615)
Description --- Add exit logic for immediate pre-mine spend. In other cases, the wallet should be started so that the transaction(s) can be broadcast. Motivation and Context --- With immediate pre-mne spend, the blockchain does not exist yet and the transaction will be rejected if the wallet is started. How Has This Been Tested? --- System-level testing completed with base nodes and network available. The wallet did not connect to the network and could not broadcast partially completed transaction to a base node. **Step 3** ``` PS H:\node_01> .\minotari_console_wallet.exe --base-path . --network esmeralda --config $pwd"\config\config.toml" --log-config $pwd"\config\log4rs_console_wallet.yml" pre-mine-spend-encumber-aggregate-utxo --session-id 8rJDGzkJv598xVJ3 --input-file-names=step_2_for_leader_from_bob.json --pre-mine-file-path "C:\Users\<user>\Documents\tari_pre_mine\create" Initializing logging according to "H:\\node_01\\config\\log4rs_console_wallet.yml" Minotari Console Wallet running... (Command mode started) ============== Command Runner ============== 1. PreMineSpendEncumberAggregateUtxo(PreMineSpendEncumberAggregateUtxoArgs { session_id: "8rJDGzkJv598xVJ3", input_file_names: ["step_2_for_leader_from_bob.json"], pre_mine_file_path: Some("C:\\Users\\<user>\\Documents\\tari_pre_mine\\create") }) Processed 1 of 6 transactions Processed 2 of 6 transactions Processed 3 of 6 transactions Processed 4 of 6 transactions Processed 5 of 6 transactions Processed 6 of 6 transactions Concluded step 3 'pre-mine-spend-encumber-aggregate-utxo' Send 'step_3_for_parties.json' to parties for step 4 Minotari Console Wallet running... (Command mode completed) Shutting down wallet... Done. ``` **Step 5** ``` PS H:\node_01> .\minotari_console_wallet.exe --base-path . --network esmeralda --config $pwd"\config\config.toml" --log-config $pwd"\config\log4rs_console_wallet.yml" pre-mine-spend-aggregate-transaction --session-id 8rJDGzkJv598xVJ3 --input-file-names=step_4_for_leader_from_bob.json Initializing logging according to "H:\\node_01\\config\\log4rs_console_wallet.yml" Minotari Console Wallet running... (Command mode started) ============== Command Runner ============== 1. PreMineSpendAggregateTransaction(PreMineSpendAggregateTransactionArgs { session_id: "8rJDGzkJv598xVJ3", input_file_names: ["step_4_for_leader_from_bob.json"] }) Processed 1 of 6 Processed 2 of 6 Processed 3 of 6 Processed 4 of 6 Processed 5 of 6 Processed 6 of 6 Genesis block immediate pre-mine spend information: 'esmeralda_pre_mine_addition.json' in 'C:\Users\<user>\Documents\tari_pre_mine\spend\8rJDGzkJv598xVJ3' Concluded step 5 'pre-mine-spend-aggregate-transaction' Minotari Console Wallet running... (Command mode completed) Shutting down wallet... Done. ``` What process can a PR reviewer use to test or verify this change? --- Code review. <!-- Checklist --> <!-- 1. Is the title of your PR in the form that would make nice release notes? The title, excluding the conventional commit tag, will be included exactly as is in the CHANGELOG, so please think about it carefully. --> Breaking Changes --- - [x] None - [ ] Requires data directory on base node to be deleted - [ ] Requires hard fork - [ ] Other - Please specify <!-- Does this include a breaking change? If so, include this line as a footer --> <!-- BREAKING CHANGE: Description what the user should do, e.g. delete a database, resync the chain --> Co-authored-by: SW van Heerden <swvheerden@gmail.com>
- Loading branch information