@@ -130,16 +130,16 @@ func TestSettleInSameRound(t *testing.T) {
130
130
wwg := & sync.WaitGroup {}
131
131
wwg .Add (1 )
132
132
go func () {
133
- v , err := bob .NotifyIncomingFunds (ctx , bobAddr )
134
- fmt .Println ("BBBBB" , len (v ), err )
135
- wwg .Done ()
133
+ defer wwg .Done ()
134
+ vtxos , err := bob .NotifyIncomingFunds (ctx , bobAddr )
135
+ require .NoError (t , err )
136
+ require .NotEmpty (t , vtxos )
136
137
}()
137
138
bobRoundID , bobErr = bob .Settle (ctx )
138
139
wwg .Wait ()
139
140
}()
140
141
141
142
wg .Wait ()
142
- fmt .Println ("1" )
143
143
144
144
require .NoError (t , aliceErr )
145
145
require .NoError (t , bobErr )
@@ -152,37 +152,29 @@ func TestSettleInSameRound(t *testing.T) {
152
152
aliceVtxos , _ , err := alice .ListVtxos (ctx )
153
153
require .NoError (t , err )
154
154
require .NotEmpty (t , aliceVtxos )
155
- fmt .Println ("OK" )
156
155
157
156
bobVtxos , _ , err := bob .ListVtxos (ctx )
158
157
require .NoError (t , err )
159
158
require .NotEmpty (t , bobVtxos )
160
- fmt .Println ("OKOK" )
161
159
162
160
aliceOffchainAddr , _ , err := alice .Receive (ctx )
163
161
require .NoError (t , err )
164
- fmt .Println ("OKOKOK" )
165
162
166
163
bobOffchainAddr , _ , err := bob .Receive (ctx )
167
164
require .NoError (t , err )
168
- fmt .Println ("OKOKOKOK" )
169
165
170
166
// Alice sends to Bob
171
167
wg .Add (1 )
172
- fmt .Println ("OKOKOKOKOK" )
173
168
go func () {
174
169
defer wg .Done ()
175
170
vtxos , err := alice .NotifyIncomingFunds (ctx , bobOffchainAddr )
176
- fmt .Println ("HAKBHJV" , len (vtxos ), err )
177
171
require .NoError (t , err )
178
172
require .NotEmpty (t , vtxos )
179
173
}()
180
174
_ , err = alice .SendOffChain (ctx , false , []arksdk.Receiver {arksdk .NewBitcoinReceiver (bobOffchainAddr , 5000 )}, false )
181
175
require .NoError (t , err )
182
- fmt .Println ("OKOKOKOKOKOK" )
183
176
184
177
wg .Wait ()
185
- fmt .Println ("2" )
186
178
187
179
// Bob sends to Alice
188
180
wg .Add (1 )
@@ -196,7 +188,6 @@ func TestSettleInSameRound(t *testing.T) {
196
188
require .NoError (t , err )
197
189
198
190
wg .Wait ()
199
- fmt .Println ("3" )
200
191
201
192
wg .Add (2 )
202
193
@@ -231,7 +222,6 @@ func TestSettleInSameRound(t *testing.T) {
231
222
}()
232
223
233
224
wg .Wait ()
234
- fmt .Println ("4" )
235
225
236
226
require .NoError (t , aliceErr )
237
227
require .NoError (t , bobErr )
0 commit comments