@@ -9,8 +9,8 @@ static void Main(string[] args)
99 {
1010 Console . WriteLine ( "=== Bitcoin Kernel Basic Builder Example ===\n " ) ;
1111
12- FullChainstateExample ( ) ;
13-
12+ FullChainstateExample ( ) ;
13+
1414 }
1515
1616 static void FullChainstateExample ( )
@@ -21,18 +21,18 @@ static void FullChainstateExample()
2121 var builder = KernelLibrary . Create ( )
2222 . ForMainnet ( )
2323 . WithWorkerThreads ( 2 )
24- . WithDirectories ( "/tmp/regtest-data2" , "/tmp/regtest-data/blocks2" ) ;
25-
24+ . WithDirectories ( "/tmp/regtest-data2" , "/tmp/regtest-data/blocks2" ) ;
25+
2626 Console . WriteLine ( " Configuring logging..." ) ;
2727 builder = builder . WithLogging ( ( category , message , level ) =>
2828 {
2929 if ( level <= ( int ) BitcoinKernel . Interop . Enums . LogLevel . INFO ) // Only INFO and above
3030 Console . WriteLine ( $ " [{ category } ] { message } ") ;
31- } ) ;
32-
31+ } ) ;
32+
3333 Console . WriteLine ( " Building kernel..." ) ;
34- using var kernel = builder . Build ( ) ;
35-
34+ using var kernel = builder . Build ( ) ;
35+
3636 Console . WriteLine ( " Kernel built successfully!" ) ;
3737 Console . WriteLine ( " ✓ Chainstate initialized automatically" ) ;
3838
@@ -44,13 +44,13 @@ static void FullChainstateExample()
4444
4545 // Show new query methods
4646 Console . WriteLine ( $ " Chain height: { kernel . GetChainHeight ( ) } ") ;
47- Console . WriteLine ( $ " Genesis hash: { Convert . ToHexString ( kernel . GetGenesisBlockHash ( ) ) } ") ;
48-
47+ Console . WriteLine ( $ " Genesis hash: { Convert . ToHexString ( kernel . GetGenesisBlockHash ( ) ) } ") ;
48+
4949 if ( kernel . GetChainHeight ( ) > 0 )
5050 {
5151 var tipHash = kernel . GetChainTipHash ( ) ;
52- Console . WriteLine ( $ " Tip hash: { Convert . ToHexString ( tipHash ) } ") ;
53-
52+ Console . WriteLine ( $ " Tip hash: { Convert . ToHexString ( tipHash ) } ") ;
53+
5454 var blockInfo = kernel . GetBlockInfo ( 0 ) ;
5555 if ( blockInfo != null )
5656 {
@@ -63,12 +63,12 @@ static void FullChainstateExample()
6363 catch ( Exception ex )
6464 {
6565 Console . WriteLine ( $ " ✗ Error: { ex . Message } ") ;
66- }
67-
68-
66+ }
67+
68+
6969 Console . WriteLine ( "\n Press any key to exit..." ) ;
70- Console . ReadKey ( ) ;
71-
70+ Console . ReadKey ( ) ;
71+
7272 kernel . Dispose ( ) ;
7373 Console . WriteLine ( " Kernel disposed." ) ;
7474 }
0 commit comments