@@ -6,6 +6,7 @@ namespace Lib9c.Tests
66 using System . Linq ;
77 using System . Numerics ;
88 using Bencodex . Types ;
9+ using Lib9c . Renderers ;
910 using Libplanet . Action ;
1011 using Libplanet . Blockchain ;
1112 using Libplanet . Blockchain . Policies ;
@@ -45,7 +46,7 @@ public void ValidateNextBlockTx()
4546 var adminPrivateKey = new PrivateKey ( ) ;
4647 var adminAddress = adminPrivateKey . ToAddress ( ) ;
4748
48- var blockPolicySource = new BlockPolicySource ( Logger . None ) ;
49+ var blockPolicySource = new BlockPolicySource ( ) ;
4950 IBlockPolicy policy = blockPolicySource . GetPolicy ( null , null , null , null ) ;
5051 IStagePolicy stagePolicy = new VolatileStagePolicy ( ) ;
5152 Block genesis = MakeGenesisBlock (
@@ -67,7 +68,7 @@ public void ValidateNextBlockTx()
6768 blockChainStates : new BlockChainStates ( store , stateStore ) ,
6869 actionTypeLoader : new NCActionLoader ( )
6970 ) ,
70- renderers : new [ ] { blockPolicySource . BlockRenderer }
71+ renderers : new [ ] { new BlockRenderer ( ) }
7172 ) ;
7273 Transaction txByStranger =
7374 Transaction . Create (
@@ -136,7 +137,7 @@ public void ValidateNextBlockTx_Mead()
136137 {
137138 var adminPrivateKey = new PrivateKey ( ) ;
138139 var adminAddress = adminPrivateKey . ToAddress ( ) ;
139- var blockPolicySource = new BlockPolicySource ( Logger . None ) ;
140+ var blockPolicySource = new BlockPolicySource ( ) ;
140141 var actionTypeLoader = new NCActionLoader ( ) ;
141142 IBlockPolicy policy = blockPolicySource . GetPolicy ( null , null , null , null ) ;
142143 IStagePolicy stagePolicy = new VolatileStagePolicy ( ) ;
@@ -177,7 +178,7 @@ public void ValidateNextBlockTx_Mead()
177178 blockChainStates : new BlockChainStates ( store , stateStore ) ,
178179 actionTypeLoader : new NCActionLoader ( )
179180 ) ,
180- renderers : new [ ] { blockPolicySource . BlockRenderer }
181+ renderers : new [ ] { new BlockRenderer ( ) }
181182 ) ;
182183 Assert . Equal ( 1 * Currencies . Mead , blockChain . GetBalance ( adminAddress , Currencies . Mead ) ) ;
183184 Assert . Equal ( 1 * Currencies . Mead , blockChain . GetBalance ( MeadConfig . PatronAddress , Currencies . Mead ) ) ;
@@ -243,7 +244,7 @@ public void BlockCommitFromNonValidator()
243244 var adminAddress = adminPrivateKey . ToAddress ( ) ;
244245 var nonValidator = new PrivateKey ( ) ;
245246
246- var blockPolicySource = new BlockPolicySource ( Logger . None ) ;
247+ var blockPolicySource = new BlockPolicySource ( ) ;
247248 IBlockPolicy policy = blockPolicySource . GetPolicy ( null , null , null , null ) ;
248249 IStagePolicy stagePolicy = new VolatileStagePolicy ( ) ;
249250 Block genesis = MakeGenesisBlock (
@@ -265,7 +266,7 @@ public void BlockCommitFromNonValidator()
265266 blockChainStates : new BlockChainStates ( store , stateStore ) ,
266267 actionTypeLoader : new NCActionLoader ( )
267268 ) ,
268- renderers : new [ ] { blockPolicySource . BlockRenderer }
269+ renderers : new [ ] { new BlockRenderer ( ) }
269270 ) ;
270271 blockChain . MakeTransaction (
271272 adminPrivateKey ,
@@ -288,7 +289,7 @@ public void MustNotIncludeBlockActionAtTransaction()
288289 new byte [ ] { 0x00 , 0x01 }
289290 ) ;
290291
291- var blockPolicySource = new BlockPolicySource ( Logger . None ) ;
292+ var blockPolicySource = new BlockPolicySource ( ) ;
292293 IBlockPolicy policy = blockPolicySource . GetPolicy (
293294 maxTransactionsBytesPolicy : null ,
294295 minTransactionsPerBlockPolicy : null ,
@@ -319,7 +320,7 @@ public void MustNotIncludeBlockActionAtTransaction()
319320 blockChainStates : new BlockChainStates ( store , stateStore ) ,
320321 actionTypeLoader : actionLoader
321322 ) ,
322- renderers : new [ ] { blockPolicySource . BlockRenderer }
323+ renderers : new [ ] { new BlockRenderer ( ) }
323324 ) ;
324325
325326 var unloadableAction = blockChain . MakeTransaction (
@@ -340,7 +341,7 @@ public void EarnMiningGoldWhenSuccessMining()
340341 new byte [ ] { 0x00 , 0x01 }
341342 ) ;
342343
343- var blockPolicySource = new BlockPolicySource ( Logger . None ) ;
344+ var blockPolicySource = new BlockPolicySource ( ) ;
344345 IBlockPolicy policy = blockPolicySource . GetPolicy (
345346 maxTransactionsBytesPolicy : null ,
346347 minTransactionsPerBlockPolicy : null ,
@@ -372,7 +373,7 @@ public void EarnMiningGoldWhenSuccessMining()
372373 blockChainStates : new BlockChainStates ( store , stateStore ) ,
373374 actionTypeLoader : new NCActionLoader ( )
374375 ) ,
375- renderers : new [ ] { blockPolicySource . BlockRenderer }
376+ renderers : new [ ] { new BlockRenderer ( ) }
376377 ) ;
377378
378379 blockChain . MakeTransaction (
@@ -392,7 +393,7 @@ public void ValidateNextBlockWithManyTransactions()
392393 {
393394 var adminPrivateKey = new PrivateKey ( ) ;
394395 var adminPublicKey = adminPrivateKey . PublicKey ;
395- var blockPolicySource = new BlockPolicySource ( Logger . None ) ;
396+ var blockPolicySource = new BlockPolicySource ( ) ;
396397 IBlockPolicy policy = blockPolicySource . GetPolicy (
397398 maxTransactionsBytesPolicy : null ,
398399 minTransactionsPerBlockPolicy : null ,
@@ -491,7 +492,7 @@ public void ValidateNextBlockWithManyTransactionsPerSigner()
491492 {
492493 var adminPrivateKey = new PrivateKey ( ) ;
493494 var adminPublicKey = adminPrivateKey . PublicKey ;
494- var blockPolicySource = new BlockPolicySource ( Logger . None ) ;
495+ var blockPolicySource = new BlockPolicySource ( ) ;
495496 IBlockPolicy policy = blockPolicySource . GetPolicy (
496497 maxTransactionsBytesPolicy : null ,
497498 minTransactionsPerBlockPolicy : null ,
0 commit comments