test_class.declarator: thrown = ExpectedException.none()
test_class.modifier: @Rule
      public
test_class.original_string: @Rule
      public ExpectedException thrown = ExpectedException.none();
test_class.type: ExpectedException
test_class.var_name: thrown
test_class.declarator: testNetChain
test_class.modifier: private
test_class.original_string: private BlockChain testNetChain;
test_class.type: BlockChain
test_class.var_name: testNetChain
test_class.declarator: wallet
test_class.modifier: private
test_class.original_string: private Wallet wallet;
test_class.type: Wallet
test_class.var_name: wallet
test_class.declarator: chain
test_class.modifier: private
test_class.original_string: private BlockChain chain;
test_class.type: BlockChain
test_class.var_name: chain
test_class.declarator: blockStore
test_class.modifier: private
test_class.original_string: private BlockStore blockStore;
test_class.type: BlockStore
test_class.var_name: blockStore
test_class.declarator: coinbaseTo
test_class.modifier: private
test_class.original_string: private Address coinbaseTo;
test_class.type: Address
test_class.var_name: coinbaseTo
test_class.declarator: block = new StoredBlock[1]
test_class.modifier: private final
test_class.original_string: private final StoredBlock[] block = new StoredBlock[1];
test_class.type: StoredBlock[]
test_class.var_name: block
test_class.declarator: coinbaseTransaction
test_class.modifier: private
test_class.original_string: private Transaction coinbaseTransaction;
test_class.type: Transaction
test_class.var_name: coinbaseTransaction
test_class.declarator: TESTNET = new TweakableTestNet3Params()
test_class.modifier: private static final
test_class.original_string: private static final TweakableTestNet3Params TESTNET = new TweakableTestNet3Params();
test_class.type: TweakableTestNet3Params
test_class.var_name: TESTNET
test_class.declarator: UNITTEST = UnitTestParams.get()
test_class.modifier: private static final
test_class.original_string: private static final NetworkParameters UNITTEST = UnitTestParams.get();
test_class.type: NetworkParameters
test_class.var_name: UNITTEST
test_class.declarator: MAINNET = MainNetParams.get()
test_class.modifier: private static final
test_class.original_string: private static final NetworkParameters MAINNET = MainNetParams.get();
test_class.type: NetworkParameters
test_class.var_name: MAINNET
test_class.file: core/src/test/java/org/ulordj/core/BlockChainTest.java
test_class.identifier: BlockChainTest
test_case.body: @Test
      public void testBasicChaining() throws Exception {
          // Check that we can plug a few blocks together and the futures work.
          ListenableFuture<StoredBlock> future = testNetChain.getHeightFuture(2);
          // Block 1 from the testnet.
          Block b1 = getBlock1();
          assertTrue(testNetChain.add(b1));
          assertFalse(future.isDone());
          // Block 2 from the testnet.
          Block b2 = getBlock2();
  
          // Let's try adding an invalid block.
          BigInteger n = b2.getNonce();
          try {
              b2.setNonce(BigInteger.valueOf(12345));
              testNetChain.add(b2);
              fail();
          } catch (VerificationException e) {
              b2.setNonce(n);
          }
  
          // Now it works because we reset the nonce.
          assertTrue(testNetChain.add(b2));
          assertTrue(future.isDone());
          assertEquals(2, future.get().getHeight());
      }
test_case.class_method_signature: BlockChainTest.testBasicChaining()
test_case.full_signature: @Test public void testBasicChaining()
test_case.identifier: testBasicChaining
test_case.invocations: getHeightFuture getBlock1 assertTrue add assertFalse isDone getBlock2 getNonce setNonce valueOf add fail setNonce assertTrue add assertTrue isDone assertEquals getHeight get
test_case.modifiers: @Test public
test_case.parameters: ()
test_case.return: void
test_case.signature: void testBasicChaining()
focal_class.declarator: blockStore
focal_class.modifier: protected final
focal_class.original_string: protected final BlockStore blockStore;
focal_class.type: BlockStore
focal_class.var_name: blockStore
focal_class.file: core/src/main/java/org/ulordj/core/BlockChain.java
focal_class.identifier: BlockChain
focal_class.class_method_signature: BlockChain.BlockChain(Context context, Wallet wallet, BlockStore blockStore)
focal_class.full_signature: public  BlockChain(Context context, Wallet wallet, BlockStore blockStore)
focal_class.identifier: BlockChain
focal_class.modifiers: public
focal_class.parameters: (Context context, Wallet wallet, BlockStore blockStore)
focal_class.signature:  BlockChain(Context context, Wallet wallet, BlockStore blockStore)
focal_class.class_method_signature: BlockChain.BlockChain(NetworkParameters params, Wallet wallet, BlockStore blockStore)
focal_class.full_signature: public  BlockChain(NetworkParameters params, Wallet wallet, BlockStore blockStore)
focal_class.identifier: BlockChain
focal_class.modifiers: public
focal_class.parameters: (NetworkParameters params, Wallet wallet, BlockStore blockStore)
focal_class.signature:  BlockChain(NetworkParameters params, Wallet wallet, BlockStore blockStore)
focal_class.class_method_signature: BlockChain.BlockChain(Context context, BlockStore blockStore)
focal_class.full_signature: public  BlockChain(Context context, BlockStore blockStore)
focal_class.identifier: BlockChain
focal_class.modifiers: public
focal_class.parameters: (Context context, BlockStore blockStore)
focal_class.signature:  BlockChain(Context context, BlockStore blockStore)
focal_class.class_method_signature: BlockChain.BlockChain(NetworkParameters params, BlockStore blockStore)
focal_class.full_signature: public  BlockChain(NetworkParameters params, BlockStore blockStore)
focal_class.identifier: BlockChain
focal_class.modifiers: public
focal_class.parameters: (NetworkParameters params, BlockStore blockStore)
focal_class.signature:  BlockChain(NetworkParameters params, BlockStore blockStore)
focal_class.class_method_signature: BlockChain.BlockChain(Context params, List<? extends Wallet> wallets, BlockStore blockStore)
focal_class.full_signature: public  BlockChain(Context params, List<? extends Wallet> wallets, BlockStore blockStore)
focal_class.identifier: BlockChain
focal_class.modifiers: public
focal_class.parameters: (Context params, List<? extends Wallet> wallets, BlockStore blockStore)
focal_class.signature:  BlockChain(Context params, List<? extends Wallet> wallets, BlockStore blockStore)
focal_class.class_method_signature: BlockChain.BlockChain(NetworkParameters params, List<? extends Wallet> wallets, BlockStore blockStore)
focal_class.full_signature: public  BlockChain(NetworkParameters params, List<? extends Wallet> wallets, BlockStore blockStore)
focal_class.identifier: BlockChain
focal_class.modifiers: public
focal_class.parameters: (NetworkParameters params, List<? extends Wallet> wallets, BlockStore blockStore)
focal_class.signature:  BlockChain(NetworkParameters params, List<? extends Wallet> wallets, BlockStore blockStore)
focal_class.class_method_signature: BlockChain.addToBlockStore(StoredBlock storedPrev, Block blockHeader, TransactionOutputChanges txOutChanges)
focal_class.full_signature: @Override protected StoredBlock addToBlockStore(StoredBlock storedPrev, Block blockHeader, TransactionOutputChanges txOutChanges)
focal_class.identifier: addToBlockStore
focal_class.modifiers: @Override protected
focal_class.parameters: (StoredBlock storedPrev, Block blockHeader, TransactionOutputChanges txOutChanges)
focal_class.return: StoredBlock
focal_class.signature: StoredBlock addToBlockStore(StoredBlock storedPrev, Block blockHeader, TransactionOutputChanges txOutChanges)
focal_class.class_method_signature: BlockChain.addToBlockStore(StoredBlock storedPrev, Block blockHeader)
focal_class.full_signature: @Override protected StoredBlock addToBlockStore(StoredBlock storedPrev, Block blockHeader)
focal_class.identifier: addToBlockStore
focal_class.modifiers: @Override protected
focal_class.parameters: (StoredBlock storedPrev, Block blockHeader)
focal_class.return: StoredBlock
focal_class.signature: StoredBlock addToBlockStore(StoredBlock storedPrev, Block blockHeader)
focal_class.class_method_signature: BlockChain.rollbackBlockStore(int height)
focal_class.full_signature: @Override protected void rollbackBlockStore(int height)
focal_class.identifier: rollbackBlockStore
focal_class.modifiers: @Override protected
focal_class.parameters: (int height)
focal_class.return: void
focal_class.signature: void rollbackBlockStore(int height)
focal_class.class_method_signature: BlockChain.shouldVerifyTransactions()
focal_class.full_signature: @Override protected boolean shouldVerifyTransactions()
focal_class.identifier: shouldVerifyTransactions
focal_class.modifiers: @Override protected
focal_class.parameters: ()
focal_class.return: boolean
focal_class.signature: boolean shouldVerifyTransactions()
focal_class.class_method_signature: BlockChain.connectTransactions(int height, Block block)
focal_class.full_signature: @Override protected TransactionOutputChanges connectTransactions(int height, Block block)
focal_class.identifier: connectTransactions
focal_class.modifiers: @Override protected
focal_class.parameters: (int height, Block block)
focal_class.return: TransactionOutputChanges
focal_class.signature: TransactionOutputChanges connectTransactions(int height, Block block)
focal_class.class_method_signature: BlockChain.connectTransactions(StoredBlock newBlock)
focal_class.full_signature: @Override protected TransactionOutputChanges connectTransactions(StoredBlock newBlock)
focal_class.identifier: connectTransactions
focal_class.modifiers: @Override protected
focal_class.parameters: (StoredBlock newBlock)
focal_class.return: TransactionOutputChanges
focal_class.signature: TransactionOutputChanges connectTransactions(StoredBlock newBlock)
focal_class.class_method_signature: BlockChain.disconnectTransactions(StoredBlock block)
focal_class.full_signature: @Override protected void disconnectTransactions(StoredBlock block)
focal_class.identifier: disconnectTransactions
focal_class.modifiers: @Override protected
focal_class.parameters: (StoredBlock block)
focal_class.return: void
focal_class.signature: void disconnectTransactions(StoredBlock block)
focal_class.class_method_signature: BlockChain.doSetChainHead(StoredBlock chainHead)
focal_class.full_signature: @Override protected void doSetChainHead(StoredBlock chainHead)
focal_class.identifier: doSetChainHead
focal_class.modifiers: @Override protected
focal_class.parameters: (StoredBlock chainHead)
focal_class.return: void
focal_class.signature: void doSetChainHead(StoredBlock chainHead)
focal_class.class_method_signature: BlockChain.notSettingChainHead()
focal_class.full_signature: @Override protected void notSettingChainHead()
focal_class.identifier: notSettingChainHead
focal_class.modifiers: @Override protected
focal_class.parameters: ()
focal_class.return: void
focal_class.signature: void notSettingChainHead()
focal_class.class_method_signature: BlockChain.getStoredBlockInCurrentScope(Sha256Hash hash)
focal_class.full_signature: @Override protected StoredBlock getStoredBlockInCurrentScope(Sha256Hash hash)
focal_class.identifier: getStoredBlockInCurrentScope
focal_class.modifiers: @Override protected
focal_class.parameters: (Sha256Hash hash)
focal_class.return: StoredBlock
focal_class.signature: StoredBlock getStoredBlockInCurrentScope(Sha256Hash hash)
focal_class.class_method_signature: BlockChain.add(FilteredBlock block)
focal_class.full_signature: @Override public boolean add(FilteredBlock block)
focal_class.identifier: add
focal_class.modifiers: @Override public
focal_class.parameters: (FilteredBlock block)
focal_class.return: boolean
focal_class.signature: boolean add(FilteredBlock block)
focal_class.superclass: extends AbstractBlockChain
focal_method.body: @Override
      public boolean add(FilteredBlock block) throws VerificationException, PrunedException {
          boolean success = super.add(block);
          if (success) {
              trackFilteredTransactions(block.getTransactionCount());
          }
          return success;
      }
focal_method.class_method_signature: BlockChain.add(FilteredBlock block)
focal_method.full_signature: @Override public boolean add(FilteredBlock block)
focal_method.identifier: add
focal_method.invocations: add trackFilteredTransactions getTransactionCount
focal_method.modifiers: @Override public
focal_method.parameters: (FilteredBlock block)
focal_method.return: boolean
focal_method.signature: boolean add(FilteredBlock block)