7
7
use bitcoin:: SignedAmount ;
8
8
use integration_test:: { Node , NodeExt as _, Wallet } ;
9
9
use node:: client:: client_sync:: { TemplateRequest , TemplateRules } ;
10
- use node:: vtype:: * ; // All the version specific types.
11
10
use node:: mtype;
11
+ use node:: vtype:: * ; // All the version specific types.
12
12
13
13
#[ test]
14
14
fn mining__get_block_template__modelled ( ) {
@@ -72,7 +72,7 @@ fn mining__prioritise_transaction() {
72
72
}
73
73
74
74
#[ test]
75
- #[ cfg( feature = "TODO" ) ] // This test is flaky - no clue why.
75
+ #[ cfg( feature = "TODO" ) ] // This test is flaky - no clue why.
76
76
fn mining__submit_block ( ) {
77
77
// Requires connected nodes otherwise the RPC call errors.
78
78
let ( node1, node2, node3) = integration_test:: three_node_network ( ) ;
@@ -96,8 +96,8 @@ fn mining__submit_block() {
96
96
fn submit_empty_block ( node : & Node , bt : & mtype:: GetBlockTemplate ) {
97
97
use bitcoin:: hashes:: Hash as _;
98
98
use bitcoin:: {
99
- absolute, block, transaction, Amount , Block , OutPoint , ScriptBuf , Sequence ,
100
- Transaction , TxIn , TxOut , Witness , ScriptHash , TxMerkleNode ,
99
+ absolute, block, transaction, Amount , Block , OutPoint , ScriptBuf , ScriptHash , Sequence ,
100
+ Transaction , TxIn , TxMerkleNode , TxOut , Witness ,
101
101
} ;
102
102
103
103
let txdata = vec ! [ Transaction {
@@ -124,7 +124,10 @@ fn submit_empty_block(node: &Node, bt: &mtype::GetBlockTemplate) {
124
124
version : block:: Version :: default ( ) ,
125
125
prev_blockhash : bt. previous_block_hash ,
126
126
merkle_root : TxMerkleNode :: all_zeros ( ) ,
127
- time : Ord :: max ( bt. min_time , std:: time:: UNIX_EPOCH . elapsed ( ) . expect ( "elapsed" ) . as_secs ( ) as u32 ) as u32 ,
127
+ time : Ord :: max (
128
+ bt. min_time ,
129
+ std:: time:: UNIX_EPOCH . elapsed ( ) . expect ( "elapsed" ) . as_secs ( ) as u32 ,
130
+ ) as u32 ,
128
131
bits : bt. bits ,
129
132
nonce : 0 ,
130
133
} ,
@@ -148,8 +151,8 @@ fn submit_empty_block(node: &Node, bt: &mtype::GetBlockTemplate) {
148
151
fn mining__submit_block_with_dummy_coinbase ( node : & Node , bt : & mtype:: GetBlockTemplate ) {
149
152
use bitcoin:: hashes:: Hash as _;
150
153
use bitcoin:: {
151
- absolute, block, transaction, Amount , Block , OutPoint , ScriptBuf , Sequence ,
152
- Transaction , TxIn , TxOut , Witness , TxMerkleNode ,
154
+ absolute, block, transaction, Amount , Block , OutPoint , ScriptBuf , Sequence , Transaction ,
155
+ TxIn , TxMerkleNode , TxOut , Witness ,
153
156
} ;
154
157
155
158
let address = node. client . new_address ( ) . expect ( "failed to get new address" ) ;
0 commit comments