@@ -176,6 +176,8 @@ func TestBlockSyncerProcessBlockTipHeight(t *testing.T) {
176
176
cfg , err := newTestConfig ()
177
177
require .Nil (err )
178
178
registry := protocol.Registry {}
179
+ acc := account .NewProtocol ()
180
+ require .NoError (registry .Register (account .ProtocolID , acc ))
179
181
rp := rolldpos .NewProtocol (cfg .Genesis .NumCandidateDelegates , cfg .Genesis .NumDelegates , cfg .Genesis .NumSubEpochs )
180
182
require .NoError (registry .Register (rolldpos .ProtocolID , rp ))
181
183
chain := bc .NewBlockchain (
@@ -186,7 +188,6 @@ func TestBlockSyncerProcessBlockTipHeight(t *testing.T) {
186
188
bc .RegistryOption (& registry ),
187
189
)
188
190
chain .Validator ().AddActionEnvelopeValidators (protocol .NewGenericValidator (chain .Factory ().Nonce ))
189
- chain .Validator ().AddActionValidators (account .NewProtocol ())
190
191
require .NoError (chain .Start (ctx ))
191
192
require .NotNil (chain )
192
193
ap , err := actpool .NewActPool (chain , cfg .ActPool , actpool .EnableExperimentalActions ())
@@ -234,6 +235,8 @@ func TestBlockSyncerProcessBlockOutOfOrder(t *testing.T) {
234
235
cfg , err := newTestConfig ()
235
236
require .Nil (err )
236
237
registry := protocol.Registry {}
238
+ acc := account .NewProtocol ()
239
+ require .NoError (registry .Register (account .ProtocolID , acc ))
237
240
rp := rolldpos .NewProtocol (cfg .Genesis .NumCandidateDelegates , cfg .Genesis .NumDelegates , cfg .Genesis .NumSubEpochs )
238
241
require .NoError (registry .Register (rolldpos .ProtocolID , rp ))
239
242
chain1 := bc .NewBlockchain (
@@ -245,7 +248,6 @@ func TestBlockSyncerProcessBlockOutOfOrder(t *testing.T) {
245
248
)
246
249
require .NotNil (chain1 )
247
250
chain1 .Validator ().AddActionEnvelopeValidators (protocol .NewGenericValidator (chain1 .Factory ().Nonce ))
248
- chain1 .Validator ().AddActionValidators (account .NewProtocol ())
249
251
require .NoError (chain1 .Start (ctx ))
250
252
ap1 , err := actpool .NewActPool (chain1 , cfg .ActPool , actpool .EnableExperimentalActions ())
251
253
require .NotNil (ap1 )
@@ -257,6 +259,7 @@ func TestBlockSyncerProcessBlockOutOfOrder(t *testing.T) {
257
259
bs1 , err := NewBlockSyncer (cfg , chain1 , ap1 , cs1 , opts ... )
258
260
require .Nil (err )
259
261
registry2 := protocol.Registry {}
262
+ require .NoError (registry2 .Register (account .ProtocolID , acc ))
260
263
require .NoError (registry2 .Register (rolldpos .ProtocolID , rp ))
261
264
chain2 := bc .NewBlockchain (
262
265
cfg ,
@@ -267,7 +270,6 @@ func TestBlockSyncerProcessBlockOutOfOrder(t *testing.T) {
267
270
)
268
271
require .NotNil (chain2 )
269
272
chain2 .Validator ().AddActionEnvelopeValidators (protocol .NewGenericValidator (chain2 .Factory ().Nonce ))
270
- chain2 .Validator ().AddActionValidators (account .NewProtocol ())
271
273
require .NoError (chain2 .Start (ctx ))
272
274
ap2 , err := actpool .NewActPool (chain2 , cfg .ActPool , actpool .EnableExperimentalActions ())
273
275
require .NotNil (ap2 )
@@ -325,6 +327,8 @@ func TestBlockSyncerProcessBlockSync(t *testing.T) {
325
327
cfg , err := newTestConfig ()
326
328
require .Nil (err )
327
329
registry := protocol.Registry {}
330
+ acc := account .NewProtocol ()
331
+ require .NoError (registry .Register (account .ProtocolID , acc ))
328
332
rolldposProtocol := rolldpos .NewProtocol (
329
333
cfg .Genesis .NumCandidateDelegates ,
330
334
cfg .Genesis .NumDelegates ,
@@ -339,7 +343,6 @@ func TestBlockSyncerProcessBlockSync(t *testing.T) {
339
343
bc .RegistryOption (& registry ),
340
344
)
341
345
chain1 .Validator ().AddActionEnvelopeValidators (protocol .NewGenericValidator (chain1 .Factory ().Nonce ))
342
- chain1 .Validator ().AddActionValidators (account .NewProtocol ())
343
346
require .NoError (chain1 .Start (ctx ))
344
347
require .NotNil (chain1 )
345
348
ap1 , err := actpool .NewActPool (chain1 , cfg .ActPool )
@@ -351,6 +354,7 @@ func TestBlockSyncerProcessBlockSync(t *testing.T) {
351
354
bs1 , err := NewBlockSyncer (cfg , chain1 , ap1 , cs1 , opts ... )
352
355
require .Nil (err )
353
356
registry2 := protocol.Registry {}
357
+ require .NoError (registry2 .Register (account .ProtocolID , acc ))
354
358
require .NoError (registry2 .Register (rolldpos .ProtocolID , rolldposProtocol ))
355
359
chain2 := bc .NewBlockchain (
356
360
cfg ,
@@ -360,7 +364,6 @@ func TestBlockSyncerProcessBlockSync(t *testing.T) {
360
364
bc .RegistryOption (& registry2 ),
361
365
)
362
366
chain2 .Validator ().AddActionEnvelopeValidators (protocol .NewGenericValidator (chain2 .Factory ().Nonce ))
363
- chain2 .Validator ().AddActionValidators (account .NewProtocol ())
364
367
require .NoError (chain2 .Start (ctx ))
365
368
require .NotNil (chain2 )
366
369
ap2 , err := actpool .NewActPool (chain2 , cfg .ActPool , actpool .EnableExperimentalActions ())
0 commit comments