@@ -181,11 +181,6 @@ static void rebroadcast_txs(struct chain_topology *topo, struct command *cmd)
181181 struct txs_to_broadcast * txs ;
182182 struct outgoing_tx * otx ;
183183
184- #if DEVELOPER
185- if (topo -> dev_no_broadcast )
186- return ;
187- #endif /* DEVELOPER */
188-
189184 txs = tal (topo , struct txs_to_broadcast );
190185 txs -> cmd = cmd ;
191186
@@ -260,12 +255,6 @@ void broadcast_tx(struct chain_topology *topo,
260255 log_add (topo -> log , " (tx %s)" ,
261256 type_to_string (ltmp , struct bitcoin_txid , & otx -> txid ));
262257
263- #if DEVELOPER
264- if (topo -> dev_no_broadcast ) {
265- broadcast_done (topo -> bitcoind , 0 , "dev_no_broadcast" , otx );
266- return ;
267- }
268- #endif
269258 bitcoind_sendrawtx (topo -> bitcoind , otx -> hextx , broadcast_done , otx );
270259}
271260
@@ -554,35 +543,6 @@ struct txlocator *locate_tx(const void *ctx, const struct chain_topology *topo,
554543}
555544
556545#if DEVELOPER
557- void json_dev_broadcast (struct command * cmd ,
558- struct chain_topology * topo ,
559- const char * buffer , const jsmntok_t * params )
560- {
561- jsmntok_t * enabletok ;
562- bool enable ;
563-
564- if (!json_get_params (cmd , buffer , params ,
565- "enable" , & enabletok ,
566- NULL )) {
567- return ;
568- }
569-
570- if (!json_tok_bool (buffer , enabletok , & enable )) {
571- command_fail (cmd , "Enable must be true or false" );
572- return ;
573- }
574-
575- log_debug (cmd -> ld -> log , "dev-broadcast: broadcast %s" ,
576- enable ? "enabled" : "disabled" );
577- cmd -> ld -> topology -> dev_no_broadcast = !enable ;
578-
579- /* If enabling, flush and wait. */
580- if (enable )
581- rebroadcast_txs (cmd -> ld -> topology , cmd );
582- else
583- command_success (cmd , null_response (cmd ));
584- }
585-
586546static void json_dev_blockheight (struct command * cmd ,
587547 const char * buffer UNUSED , const jsmntok_t * params UNUSED )
588548{
@@ -706,9 +666,6 @@ struct chain_topology *new_topology(struct lightningd *ld, struct log *log)
706666 topo -> default_fee_rate = 40000 ;
707667 topo -> override_fee_rate = NULL ;
708668 topo -> bitcoind = new_bitcoind (topo , ld , log );
709- #if DEVELOPER
710- topo -> dev_no_broadcast = false;
711- #endif
712669
713670 return topo ;
714671}
0 commit comments