File tree Expand file tree Collapse file tree 1 file changed +16
-13
lines changed
testnet/stacks-node/src/nakamoto_node Expand file tree Collapse file tree 1 file changed +16
-13
lines changed Original file line number Diff line number Diff line change @@ -1066,20 +1066,23 @@ impl RelayerThread {
1066
1066
1067
1067
// sign and broadcast
1068
1068
let mut op_signer = self . keychain . generate_op_signer ( ) ;
1069
- let txid = self
1070
- . bitcoin_controller
1071
- . submit_operation (
1072
- last_committed. get_epoch_id ( ) . clone ( ) ,
1073
- BlockstackOperationType :: LeaderBlockCommit (
1074
- last_committed. get_block_commit ( ) . clone ( ) ,
1075
- ) ,
1076
- & mut op_signer,
1077
- 1 ,
1078
- )
1079
- . map_err ( |e| {
1069
+ let res = self . bitcoin_controller . submit_operation (
1070
+ last_committed. get_epoch_id ( ) . clone ( ) ,
1071
+ BlockstackOperationType :: LeaderBlockCommit ( last_committed. get_block_commit ( ) . clone ( ) ) ,
1072
+ & mut op_signer,
1073
+ 1 ,
1074
+ ) ;
1075
+ let txid = match res {
1076
+ Ok ( txid) => txid,
1077
+ Err ( e) => {
1078
+ if self . config . node . mock_mining {
1079
+ debug ! ( "Relayer: Mock-mining enabled; not sending Bitcoin transaction" ) ;
1080
+ return Ok ( ( ) ) ;
1081
+ }
1080
1082
warn ! ( "Failed to submit block-commit bitcoin transaction: {e}" ) ;
1081
- NakamotoNodeError :: BurnchainSubmissionFailed ( e)
1082
- } ) ?;
1083
+ return Err ( NakamotoNodeError :: BurnchainSubmissionFailed ( e) ) ;
1084
+ }
1085
+ } ;
1083
1086
1084
1087
info ! (
1085
1088
"Relayer: Submitted block-commit" ;
You can’t perform that action at this time.
0 commit comments