target stringlengths 20 113k | src_fm stringlengths 11 86.3k | src_fm_fc stringlengths 21 86.4k | src_fm_fc_co stringlengths 30 86.4k | src_fm_fc_ms stringlengths 42 86.8k | src_fm_fc_ms_ff stringlengths 43 86.8k |
|---|---|---|---|---|---|
@Ignore @Test public void testCODECOPY_2() { program = getProgram("605E60076000396000605f556014600054601e60205463abcddcba6040545b51602001" + "600a5254516040016014525451606001601e5254516080016028525460a05254601660" + "4860003960166000f26000603f556103e75660005460005360200235602054"); String m_expected_1 = "6000605F556014... | public void step(Program aprogram) { steps(aprogram,1); } | VM { public void step(Program aprogram) { steps(aprogram,1); } } | VM { public void step(Program aprogram) { steps(aprogram,1); } VM(VmConfig vmConfig, PrecompiledContracts precompiledContracts); } | VM { public void step(Program aprogram) { steps(aprogram,1); } VM(VmConfig vmConfig, PrecompiledContracts precompiledContracts); void step(Program aprogram); int getVmCounter(); void resetVmCounter(); static long limitedAddToMaxLong(long left, long right); void steps(Program aprogram, long steps); void initDebugData();... | VM { public void step(Program aprogram) { steps(aprogram,1); } VM(VmConfig vmConfig, PrecompiledContracts precompiledContracts); void step(Program aprogram); int getVmCounter(); void resetVmCounter(); static long limitedAddToMaxLong(long left, long right); void steps(Program aprogram, long steps); void initDebugData();... |
@Ignore @Test public void testCODECOPY_3() { program = getProgram("605E60076000396000605f556014600054601e60205463abcddcba6040545b51602001" + "600a5254516040016014525451606001601e5254516080016028525460a0525460166048600" + "03960166000f26000603f556103e75660005460005360200235"); vm.step(program); vm.step(program); vm.step... | public void step(Program aprogram) { steps(aprogram,1); } | VM { public void step(Program aprogram) { steps(aprogram,1); } } | VM { public void step(Program aprogram) { steps(aprogram,1); } VM(VmConfig vmConfig, PrecompiledContracts precompiledContracts); } | VM { public void step(Program aprogram) { steps(aprogram,1); } VM(VmConfig vmConfig, PrecompiledContracts precompiledContracts); void step(Program aprogram); int getVmCounter(); void resetVmCounter(); static long limitedAddToMaxLong(long left, long right); void steps(Program aprogram, long steps); void initDebugData();... | VM { public void step(Program aprogram) { steps(aprogram,1); } VM(VmConfig vmConfig, PrecompiledContracts precompiledContracts); void step(Program aprogram); int getVmCounter(); void resetVmCounter(); static long limitedAddToMaxLong(long left, long right); void steps(Program aprogram, long steps); void initDebugData();... |
@Ignore @Test public void testCODECOPY_4() { program = getProgram("605E60076000396000605f556014600054601e60205463abcddcba6040545b51602001600a5254" + "516040016014525451606001601e5254516080016028525460a052546016604860003960166000f260006" + "03f556103e756600054600053602002351234"); vm.step(program); vm.step(program); vm.... | public void step(Program aprogram) { steps(aprogram,1); } | VM { public void step(Program aprogram) { steps(aprogram,1); } } | VM { public void step(Program aprogram) { steps(aprogram,1); } VM(VmConfig vmConfig, PrecompiledContracts precompiledContracts); } | VM { public void step(Program aprogram) { steps(aprogram,1); } VM(VmConfig vmConfig, PrecompiledContracts precompiledContracts); void step(Program aprogram); int getVmCounter(); void resetVmCounter(); static long limitedAddToMaxLong(long left, long right); void steps(Program aprogram, long steps); void initDebugData();... | VM { public void step(Program aprogram) { steps(aprogram,1); } VM(VmConfig vmConfig, PrecompiledContracts precompiledContracts); void step(Program aprogram); int getVmCounter(); void resetVmCounter(); static long limitedAddToMaxLong(long left, long right); void steps(Program aprogram, long steps); void initDebugData();... |
@Test public void getBlockByNumberBlockWithUncles() { World world = new World(); Web3Impl web3 = createWeb3(world); Block genesis = world.getBlockChain().getBestBlock(); Block block1 = new BlockBuilder(world.getBlockChain(), world.getBridgeSupportFactory(), world.getBlockStore()) .trieStore(world.getTrieStore()) .diffi... | @Override public BlockResultDTO eth_getBlockByNumber(String bnOrId, Boolean fullTransactionObjects) { BlockResultDTO s = null; try { s = web3InformationRetriever.getBlock(bnOrId) .map(b -> getBlockResult(b, fullTransactionObjects)) .orElse(null); return s; } finally { if (logger.isDebugEnabled()) { logger.debug("eth_ge... | Web3Impl implements Web3 { @Override public BlockResultDTO eth_getBlockByNumber(String bnOrId, Boolean fullTransactionObjects) { BlockResultDTO s = null; try { s = web3InformationRetriever.getBlock(bnOrId) .map(b -> getBlockResult(b, fullTransactionObjects)) .orElse(null); return s; } finally { if (logger.isDebugEnable... | Web3Impl implements Web3 { @Override public BlockResultDTO eth_getBlockByNumber(String bnOrId, Boolean fullTransactionObjects) { BlockResultDTO s = null; try { s = web3InformationRetriever.getBlock(bnOrId) .map(b -> getBlockResult(b, fullTransactionObjects)) .orElse(null); return s; } finally { if (logger.isDebugEnable... | Web3Impl implements Web3 { @Override public BlockResultDTO eth_getBlockByNumber(String bnOrId, Boolean fullTransactionObjects) { BlockResultDTO s = null; try { s = web3InformationRetriever.getBlock(bnOrId) .map(b -> getBlockResult(b, fullTransactionObjects)) .orElse(null); return s; } finally { if (logger.isDebugEnable... | Web3Impl implements Web3 { @Override public BlockResultDTO eth_getBlockByNumber(String bnOrId, Boolean fullTransactionObjects) { BlockResultDTO s = null; try { s = web3InformationRetriever.getBlock(bnOrId) .map(b -> getBlockResult(b, fullTransactionObjects)) .orElse(null); return s; } finally { if (logger.isDebugEnable... |
@Test public void testCODECOPY_5() { program = getProgram("611234600054615566602054607060006020396000605f556014600054601e6020546" + "3abcddcba6040545b51602001600a5254516040016014525451606001601e5254516080016028525460a05" + "2546016604860003960166000f26000603f556103e756600054600053602002351234"); vm.step(program); vm.st... | public void step(Program aprogram) { steps(aprogram,1); } | VM { public void step(Program aprogram) { steps(aprogram,1); } } | VM { public void step(Program aprogram) { steps(aprogram,1); } VM(VmConfig vmConfig, PrecompiledContracts precompiledContracts); } | VM { public void step(Program aprogram) { steps(aprogram,1); } VM(VmConfig vmConfig, PrecompiledContracts precompiledContracts); void step(Program aprogram); int getVmCounter(); void resetVmCounter(); static long limitedAddToMaxLong(long left, long right); void steps(Program aprogram, long steps); void initDebugData();... | VM { public void step(Program aprogram) { steps(aprogram,1); } VM(VmConfig vmConfig, PrecompiledContracts precompiledContracts); void step(Program aprogram); int getVmCounter(); void resetVmCounter(); static long limitedAddToMaxLong(long left, long right); void steps(Program aprogram, long steps); void initDebugData();... |
@Test(expected = StackTooSmallException.class) public void testCODECOPY_6() { program = getProgram("605E6007396000605f556014600054601e60205463abcddcba604054" + "5b51602001600a5254516040016014525451606001601e5254516080016028525460a" + "052546016604860003960166000f26000603f556103e756600054600053602002351234"); try { vm.s... | public void step(Program aprogram) { steps(aprogram,1); } | VM { public void step(Program aprogram) { steps(aprogram,1); } } | VM { public void step(Program aprogram) { steps(aprogram,1); } VM(VmConfig vmConfig, PrecompiledContracts precompiledContracts); } | VM { public void step(Program aprogram) { steps(aprogram,1); } VM(VmConfig vmConfig, PrecompiledContracts precompiledContracts); void step(Program aprogram); int getVmCounter(); void resetVmCounter(); static long limitedAddToMaxLong(long left, long right); void steps(Program aprogram, long steps); void initDebugData();... | VM { public void step(Program aprogram) { steps(aprogram,1); } VM(VmConfig vmConfig, PrecompiledContracts precompiledContracts); void step(Program aprogram); int getVmCounter(); void resetVmCounter(); static long limitedAddToMaxLong(long left, long right); void steps(Program aprogram, long steps); void initDebugData();... |
@Test public void testEXTCODECOPY_1() { program = getProgram("60036007600073471FD3AD3E9EEADEEC4608B92D16CE6B500704CC3C123456"); String m_expected_1 = "6000600000000000000000000000000000000000000000000000000000000000"; vm.step(program); vm.step(program); vm.step(program); vm.step(program); vm.step(program); assertEquals... | public void step(Program aprogram) { steps(aprogram,1); } | VM { public void step(Program aprogram) { steps(aprogram,1); } } | VM { public void step(Program aprogram) { steps(aprogram,1); } VM(VmConfig vmConfig, PrecompiledContracts precompiledContracts); } | VM { public void step(Program aprogram) { steps(aprogram,1); } VM(VmConfig vmConfig, PrecompiledContracts precompiledContracts); void step(Program aprogram); int getVmCounter(); void resetVmCounter(); static long limitedAddToMaxLong(long left, long right); void steps(Program aprogram, long steps); void initDebugData();... | VM { public void step(Program aprogram) { steps(aprogram,1); } VM(VmConfig vmConfig, PrecompiledContracts precompiledContracts); void step(Program aprogram); int getVmCounter(); void resetVmCounter(); static long limitedAddToMaxLong(long left, long right); void steps(Program aprogram, long steps); void initDebugData();... |
@Test public void testEXTCODECOPY_2() { program = getProgram("603E6007600073471FD3AD3E9EEADEEC4608B92D16CE6B500704CC3C6000605f556014"+ "600054601e60205463abcddcba6040545b51602001600a5254516040016014525451606001601e52545160"+ "80016028525460a052546016604860003960166000f26000603f556103e75660005460005360200235602054"); St... | public void step(Program aprogram) { steps(aprogram,1); } | VM { public void step(Program aprogram) { steps(aprogram,1); } } | VM { public void step(Program aprogram) { steps(aprogram,1); } VM(VmConfig vmConfig, PrecompiledContracts precompiledContracts); } | VM { public void step(Program aprogram) { steps(aprogram,1); } VM(VmConfig vmConfig, PrecompiledContracts precompiledContracts); void step(Program aprogram); int getVmCounter(); void resetVmCounter(); static long limitedAddToMaxLong(long left, long right); void steps(Program aprogram, long steps); void initDebugData();... | VM { public void step(Program aprogram) { steps(aprogram,1); } VM(VmConfig vmConfig, PrecompiledContracts precompiledContracts); void step(Program aprogram); int getVmCounter(); void resetVmCounter(); static long limitedAddToMaxLong(long left, long right); void steps(Program aprogram, long steps); void initDebugData();... |
@Test public void testEXTCODECOPY_3() { program = getProgram("605E6007600073471FD3AD3E9EEADEEC4608B92D16CE6B500704CC3C60" + "00605f556014600054601e60205463abcddcba6040545b51602001600a525451604001601452545160" + "6001601e5254516080016028525460a052546016604860003960166000f26000603f556103e75660005460005360200235"); String... | public void step(Program aprogram) { steps(aprogram,1); } | VM { public void step(Program aprogram) { steps(aprogram,1); } } | VM { public void step(Program aprogram) { steps(aprogram,1); } VM(VmConfig vmConfig, PrecompiledContracts precompiledContracts); } | VM { public void step(Program aprogram) { steps(aprogram,1); } VM(VmConfig vmConfig, PrecompiledContracts precompiledContracts); void step(Program aprogram); int getVmCounter(); void resetVmCounter(); static long limitedAddToMaxLong(long left, long right); void steps(Program aprogram, long steps); void initDebugData();... | VM { public void step(Program aprogram) { steps(aprogram,1); } VM(VmConfig vmConfig, PrecompiledContracts precompiledContracts); void step(Program aprogram); int getVmCounter(); void resetVmCounter(); static long limitedAddToMaxLong(long left, long right); void steps(Program aprogram, long steps); void initDebugData();... |
@Test public void testEXTCODECOPY_4() { program = getProgram("611234600054615566602054603E6000602073471FD3AD3E9EEADEEC4608B9" + "2D16CE6B500704CC3C6000605f556014600054601e60205463abcddcba6040545b51602001600a5" + "254516040016014525451606001601e5254516080016028525460a0525460166" + "04860003960166000f26000603f556103e7566... | public void step(Program aprogram) { steps(aprogram,1); } | VM { public void step(Program aprogram) { steps(aprogram,1); } } | VM { public void step(Program aprogram) { steps(aprogram,1); } VM(VmConfig vmConfig, PrecompiledContracts precompiledContracts); } | VM { public void step(Program aprogram) { steps(aprogram,1); } VM(VmConfig vmConfig, PrecompiledContracts precompiledContracts); void step(Program aprogram); int getVmCounter(); void resetVmCounter(); static long limitedAddToMaxLong(long left, long right); void steps(Program aprogram, long steps); void initDebugData();... | VM { public void step(Program aprogram) { steps(aprogram,1); } VM(VmConfig vmConfig, PrecompiledContracts precompiledContracts); void step(Program aprogram); int getVmCounter(); void resetVmCounter(); static long limitedAddToMaxLong(long left, long right); void steps(Program aprogram, long steps); void initDebugData();... |
@Test(expected = StackTooSmallException.class) public void testEXTCODECOPY_5() { program = getProgram("605E600773471FD3AD3E9EEADEEC4608B92D16CE6B500704CC3C"); try { vm.step(program); vm.step(program); vm.step(program); vm.step(program); } finally { assertTrue(program.isStopped()); } } | public void step(Program aprogram) { steps(aprogram,1); } | VM { public void step(Program aprogram) { steps(aprogram,1); } } | VM { public void step(Program aprogram) { steps(aprogram,1); } VM(VmConfig vmConfig, PrecompiledContracts precompiledContracts); } | VM { public void step(Program aprogram) { steps(aprogram,1); } VM(VmConfig vmConfig, PrecompiledContracts precompiledContracts); void step(Program aprogram); int getVmCounter(); void resetVmCounter(); static long limitedAddToMaxLong(long left, long right); void steps(Program aprogram, long steps); void initDebugData();... | VM { public void step(Program aprogram) { steps(aprogram,1); } VM(VmConfig vmConfig, PrecompiledContracts precompiledContracts); void step(Program aprogram); int getVmCounter(); void resetVmCounter(); static long limitedAddToMaxLong(long left, long right); void steps(Program aprogram, long steps); void initDebugData();... |
@Test public void testCODESIZE_1() { program = getProgram("385E60076000396000605f556014600054601e60205463abcddcba6040545b51602" + "001600a5254516040016014525451606001601e5254516080016028525460a05254601660486" + "0003960166000f26000603f556103e75660005460005360200235"); String s_expected_1 = "0000000000000000000000000000... | public void step(Program aprogram) { steps(aprogram,1); } | VM { public void step(Program aprogram) { steps(aprogram,1); } } | VM { public void step(Program aprogram) { steps(aprogram,1); } VM(VmConfig vmConfig, PrecompiledContracts precompiledContracts); } | VM { public void step(Program aprogram) { steps(aprogram,1); } VM(VmConfig vmConfig, PrecompiledContracts precompiledContracts); void step(Program aprogram); int getVmCounter(); void resetVmCounter(); static long limitedAddToMaxLong(long left, long right); void steps(Program aprogram, long steps); void initDebugData();... | VM { public void step(Program aprogram) { steps(aprogram,1); } VM(VmConfig vmConfig, PrecompiledContracts precompiledContracts); void step(Program aprogram); int getVmCounter(); void resetVmCounter(); static long limitedAddToMaxLong(long left, long right); void steps(Program aprogram, long steps); void initDebugData();... |
@Ignore @Test public void testEXTCODESIZE_1() { program = getProgram("73471FD3AD3E9EEADEEC4608B92D16CE6B500704CC395E60076000396000605f55" + "6014600054601e60205463abcddcba6040545b51602001600a5254516040016014525451606001" + "601e5254516080016028525460a052546016604860003960166000f26000603f556103e75660005460005360200235")... | public void step(Program aprogram) { steps(aprogram,1); } | VM { public void step(Program aprogram) { steps(aprogram,1); } } | VM { public void step(Program aprogram) { steps(aprogram,1); } VM(VmConfig vmConfig, PrecompiledContracts precompiledContracts); } | VM { public void step(Program aprogram) { steps(aprogram,1); } VM(VmConfig vmConfig, PrecompiledContracts precompiledContracts); void step(Program aprogram); int getVmCounter(); void resetVmCounter(); static long limitedAddToMaxLong(long left, long right); void steps(Program aprogram, long steps); void initDebugData();... | VM { public void step(Program aprogram) { steps(aprogram,1); } VM(VmConfig vmConfig, PrecompiledContracts precompiledContracts); void step(Program aprogram); int getVmCounter(); void resetVmCounter(); static long limitedAddToMaxLong(long left, long right); void steps(Program aprogram, long steps); void initDebugData();... |
@Test public void testMOD_1() { program = getProgram("6003600406"); String s_expected_1 = "0000000000000000000000000000000000000000000000000000000000000001"; vm.step(program); vm.step(program); vm.step(program); DataWord item1 = program.stackPop(); assertEquals(s_expected_1, ByteUtil.toHexString(item1.getData()).toUppe... | public void step(Program aprogram) { steps(aprogram,1); } | VM { public void step(Program aprogram) { steps(aprogram,1); } } | VM { public void step(Program aprogram) { steps(aprogram,1); } VM(VmConfig vmConfig, PrecompiledContracts precompiledContracts); } | VM { public void step(Program aprogram) { steps(aprogram,1); } VM(VmConfig vmConfig, PrecompiledContracts precompiledContracts); void step(Program aprogram); int getVmCounter(); void resetVmCounter(); static long limitedAddToMaxLong(long left, long right); void steps(Program aprogram, long steps); void initDebugData();... | VM { public void step(Program aprogram) { steps(aprogram,1); } VM(VmConfig vmConfig, PrecompiledContracts precompiledContracts); void step(Program aprogram); int getVmCounter(); void resetVmCounter(); static long limitedAddToMaxLong(long left, long right); void steps(Program aprogram, long steps); void initDebugData();... |
@Test public void getUncleByBlockHashAndIndexBlockWithUncles() { World world = new World(); Web3Impl web3 = createWeb3(world); Block genesis = world.getBlockChain().getBestBlock(); Block blockA = new BlockBuilder(world.getBlockChain(), world.getBridgeSupportFactory(), world.getBlockStore()) .trieStore(world.getTrieStor... | @Override public BlockResultDTO eth_getUncleByBlockHashAndIndex(String blockHash, String uncleIdx) { BlockResultDTO s = null; try { Block block = blockchain.getBlockByHash(stringHexToByteArray(blockHash)); if (block == null) { return null; } s = getUncleResultDTO(uncleIdx, block); return s; } finally { if (logger.isDeb... | Web3Impl implements Web3 { @Override public BlockResultDTO eth_getUncleByBlockHashAndIndex(String blockHash, String uncleIdx) { BlockResultDTO s = null; try { Block block = blockchain.getBlockByHash(stringHexToByteArray(blockHash)); if (block == null) { return null; } s = getUncleResultDTO(uncleIdx, block); return s; }... | Web3Impl implements Web3 { @Override public BlockResultDTO eth_getUncleByBlockHashAndIndex(String blockHash, String uncleIdx) { BlockResultDTO s = null; try { Block block = blockchain.getBlockByHash(stringHexToByteArray(blockHash)); if (block == null) { return null; } s = getUncleResultDTO(uncleIdx, block); return s; }... | Web3Impl implements Web3 { @Override public BlockResultDTO eth_getUncleByBlockHashAndIndex(String blockHash, String uncleIdx) { BlockResultDTO s = null; try { Block block = blockchain.getBlockByHash(stringHexToByteArray(blockHash)); if (block == null) { return null; } s = getUncleResultDTO(uncleIdx, block); return s; }... | Web3Impl implements Web3 { @Override public BlockResultDTO eth_getUncleByBlockHashAndIndex(String blockHash, String uncleIdx) { BlockResultDTO s = null; try { Block block = blockchain.getBlockByHash(stringHexToByteArray(blockHash)); if (block == null) { return null; } s = getUncleResultDTO(uncleIdx, block); return s; }... |
@Test public void testMOD_2() { program = getProgram("61012C6101F406"); String s_expected_1 = "00000000000000000000000000000000000000000000000000000000000000C8"; vm.step(program); vm.step(program); vm.step(program); DataWord item1 = program.stackPop(); assertEquals(s_expected_1, ByteUtil.toHexString(item1.getData()).to... | public void step(Program aprogram) { steps(aprogram,1); } | VM { public void step(Program aprogram) { steps(aprogram,1); } } | VM { public void step(Program aprogram) { steps(aprogram,1); } VM(VmConfig vmConfig, PrecompiledContracts precompiledContracts); } | VM { public void step(Program aprogram) { steps(aprogram,1); } VM(VmConfig vmConfig, PrecompiledContracts precompiledContracts); void step(Program aprogram); int getVmCounter(); void resetVmCounter(); static long limitedAddToMaxLong(long left, long right); void steps(Program aprogram, long steps); void initDebugData();... | VM { public void step(Program aprogram) { steps(aprogram,1); } VM(VmConfig vmConfig, PrecompiledContracts precompiledContracts); void step(Program aprogram); int getVmCounter(); void resetVmCounter(); static long limitedAddToMaxLong(long left, long right); void steps(Program aprogram, long steps); void initDebugData();... |
@Test public void testMOD_3() { program = getProgram("6004600206"); String s_expected_1 = "0000000000000000000000000000000000000000000000000000000000000002"; vm.step(program); vm.step(program); vm.step(program); DataWord item1 = program.stackPop(); assertEquals(s_expected_1, ByteUtil.toHexString(item1.getData()).toUppe... | public void step(Program aprogram) { steps(aprogram,1); } | VM { public void step(Program aprogram) { steps(aprogram,1); } } | VM { public void step(Program aprogram) { steps(aprogram,1); } VM(VmConfig vmConfig, PrecompiledContracts precompiledContracts); } | VM { public void step(Program aprogram) { steps(aprogram,1); } VM(VmConfig vmConfig, PrecompiledContracts precompiledContracts); void step(Program aprogram); int getVmCounter(); void resetVmCounter(); static long limitedAddToMaxLong(long left, long right); void steps(Program aprogram, long steps); void initDebugData();... | VM { public void step(Program aprogram) { steps(aprogram,1); } VM(VmConfig vmConfig, PrecompiledContracts precompiledContracts); void step(Program aprogram); int getVmCounter(); void resetVmCounter(); static long limitedAddToMaxLong(long left, long right); void steps(Program aprogram, long steps); void initDebugData();... |
@Test(expected = StackTooSmallException.class) public void testMOD_4() { program = getProgram("600406"); try { vm.step(program); vm.step(program); vm.step(program); } finally { assertTrue(program.isStopped()); } } | public void step(Program aprogram) { steps(aprogram,1); } | VM { public void step(Program aprogram) { steps(aprogram,1); } } | VM { public void step(Program aprogram) { steps(aprogram,1); } VM(VmConfig vmConfig, PrecompiledContracts precompiledContracts); } | VM { public void step(Program aprogram) { steps(aprogram,1); } VM(VmConfig vmConfig, PrecompiledContracts precompiledContracts); void step(Program aprogram); int getVmCounter(); void resetVmCounter(); static long limitedAddToMaxLong(long left, long right); void steps(Program aprogram, long steps); void initDebugData();... | VM { public void step(Program aprogram) { steps(aprogram,1); } VM(VmConfig vmConfig, PrecompiledContracts precompiledContracts); void step(Program aprogram); int getVmCounter(); void resetVmCounter(); static long limitedAddToMaxLong(long left, long right); void steps(Program aprogram, long steps); void initDebugData();... |
@Test public void testSMOD_1() { program = getProgram("6003600407"); String s_expected_1 = "0000000000000000000000000000000000000000000000000000000000000001"; vm.step(program); vm.step(program); vm.step(program); DataWord item1 = program.stackPop(); assertEquals(s_expected_1, ByteUtil.toHexString(item1.getData()).toUpp... | public void step(Program aprogram) { steps(aprogram,1); } | VM { public void step(Program aprogram) { steps(aprogram,1); } } | VM { public void step(Program aprogram) { steps(aprogram,1); } VM(VmConfig vmConfig, PrecompiledContracts precompiledContracts); } | VM { public void step(Program aprogram) { steps(aprogram,1); } VM(VmConfig vmConfig, PrecompiledContracts precompiledContracts); void step(Program aprogram); int getVmCounter(); void resetVmCounter(); static long limitedAddToMaxLong(long left, long right); void steps(Program aprogram, long steps); void initDebugData();... | VM { public void step(Program aprogram) { steps(aprogram,1); } VM(VmConfig vmConfig, PrecompiledContracts precompiledContracts); void step(Program aprogram); int getVmCounter(); void resetVmCounter(); static long limitedAddToMaxLong(long left, long right); void steps(Program aprogram, long steps); void initDebugData();... |
@Test public void testSMOD_2() { program = getProgram("7FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFE2" + "7FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF56" + "07"); String s_expected_1 = "FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEC"; vm.step(program); vm.step(p... | public void step(Program aprogram) { steps(aprogram,1); } | VM { public void step(Program aprogram) { steps(aprogram,1); } } | VM { public void step(Program aprogram) { steps(aprogram,1); } VM(VmConfig vmConfig, PrecompiledContracts precompiledContracts); } | VM { public void step(Program aprogram) { steps(aprogram,1); } VM(VmConfig vmConfig, PrecompiledContracts precompiledContracts); void step(Program aprogram); int getVmCounter(); void resetVmCounter(); static long limitedAddToMaxLong(long left, long right); void steps(Program aprogram, long steps); void initDebugData();... | VM { public void step(Program aprogram) { steps(aprogram,1); } VM(VmConfig vmConfig, PrecompiledContracts precompiledContracts); void step(Program aprogram); int getVmCounter(); void resetVmCounter(); static long limitedAddToMaxLong(long left, long right); void steps(Program aprogram, long steps); void initDebugData();... |
@Test public void testSMOD_3() { program = getProgram("7F000000000000000000000000000000000000000000000000000000000000001E" + "7FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF56" + "07"); String s_expected_1 = "FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEC"; vm.step(program); vm.step(p... | public void step(Program aprogram) { steps(aprogram,1); } | VM { public void step(Program aprogram) { steps(aprogram,1); } } | VM { public void step(Program aprogram) { steps(aprogram,1); } VM(VmConfig vmConfig, PrecompiledContracts precompiledContracts); } | VM { public void step(Program aprogram) { steps(aprogram,1); } VM(VmConfig vmConfig, PrecompiledContracts precompiledContracts); void step(Program aprogram); int getVmCounter(); void resetVmCounter(); static long limitedAddToMaxLong(long left, long right); void steps(Program aprogram, long steps); void initDebugData();... | VM { public void step(Program aprogram) { steps(aprogram,1); } VM(VmConfig vmConfig, PrecompiledContracts precompiledContracts); void step(Program aprogram); int getVmCounter(); void resetVmCounter(); static long limitedAddToMaxLong(long left, long right); void steps(Program aprogram, long steps); void initDebugData();... |
@Test(expected = StackTooSmallException.class) public void testSMOD_4() { program = getProgram("7F000000000000000000000000000000000000000000000000000000000000001E" + "07"); try { vm.step(program); vm.step(program); } finally { assertTrue(program.isStopped()); } } | public void step(Program aprogram) { steps(aprogram,1); } | VM { public void step(Program aprogram) { steps(aprogram,1); } } | VM { public void step(Program aprogram) { steps(aprogram,1); } VM(VmConfig vmConfig, PrecompiledContracts precompiledContracts); } | VM { public void step(Program aprogram) { steps(aprogram,1); } VM(VmConfig vmConfig, PrecompiledContracts precompiledContracts); void step(Program aprogram); int getVmCounter(); void resetVmCounter(); static long limitedAddToMaxLong(long left, long right); void steps(Program aprogram, long steps); void initDebugData();... | VM { public void step(Program aprogram) { steps(aprogram,1); } VM(VmConfig vmConfig, PrecompiledContracts precompiledContracts); void step(Program aprogram); int getVmCounter(); void resetVmCounter(); static long limitedAddToMaxLong(long left, long right); void steps(Program aprogram, long steps); void initDebugData();... |
@Test(expected = Program.IllegalOperationException.class) public void testScriptVersion0() { program = getProgram("FC"); try { vm.step(program); } finally { assertTrue(program.isStopped()); } } | public void step(Program aprogram) { steps(aprogram,1); } | VM { public void step(Program aprogram) { steps(aprogram,1); } } | VM { public void step(Program aprogram) { steps(aprogram,1); } VM(VmConfig vmConfig, PrecompiledContracts precompiledContracts); } | VM { public void step(Program aprogram) { steps(aprogram,1); } VM(VmConfig vmConfig, PrecompiledContracts precompiledContracts); void step(Program aprogram); int getVmCounter(); void resetVmCounter(); static long limitedAddToMaxLong(long left, long right); void steps(Program aprogram, long steps); void initDebugData();... | VM { public void step(Program aprogram) { steps(aprogram,1); } VM(VmConfig vmConfig, PrecompiledContracts precompiledContracts); void step(Program aprogram); int getVmCounter(); void resetVmCounter(); static long limitedAddToMaxLong(long left, long right); void steps(Program aprogram, long steps); void initDebugData();... |
@Test(expected = Program.IllegalOperationException.class) public void testScriptVersion1() { program = getProgram("FC000000" + "FC"); try { vm.step(program); } finally { assertTrue(program.isStopped()); } } | public void step(Program aprogram) { steps(aprogram,1); } | VM { public void step(Program aprogram) { steps(aprogram,1); } } | VM { public void step(Program aprogram) { steps(aprogram,1); } VM(VmConfig vmConfig, PrecompiledContracts precompiledContracts); } | VM { public void step(Program aprogram) { steps(aprogram,1); } VM(VmConfig vmConfig, PrecompiledContracts precompiledContracts); void step(Program aprogram); int getVmCounter(); void resetVmCounter(); static long limitedAddToMaxLong(long left, long right); void steps(Program aprogram, long steps); void initDebugData();... | VM { public void step(Program aprogram) { steps(aprogram,1); } VM(VmConfig vmConfig, PrecompiledContracts precompiledContracts); void step(Program aprogram); int getVmCounter(); void resetVmCounter(); static long limitedAddToMaxLong(long left, long right); void steps(Program aprogram, long steps); void initDebugData();... |
@Test(expected = Program.IllegalOperationException.class) public void testScriptVersion2() { program = getProgram( "FC010100" + "FC" ); try { vm.step(program); } finally { assertTrue(program.isStopped()); } } | public void step(Program aprogram) { steps(aprogram,1); } | VM { public void step(Program aprogram) { steps(aprogram,1); } } | VM { public void step(Program aprogram) { steps(aprogram,1); } VM(VmConfig vmConfig, PrecompiledContracts precompiledContracts); } | VM { public void step(Program aprogram) { steps(aprogram,1); } VM(VmConfig vmConfig, PrecompiledContracts precompiledContracts); void step(Program aprogram); int getVmCounter(); void resetVmCounter(); static long limitedAddToMaxLong(long left, long right); void steps(Program aprogram, long steps); void initDebugData();... | VM { public void step(Program aprogram) { steps(aprogram,1); } VM(VmConfig vmConfig, PrecompiledContracts precompiledContracts); void step(Program aprogram); int getVmCounter(); void resetVmCounter(); static long limitedAddToMaxLong(long left, long right); void steps(Program aprogram, long steps); void initDebugData();... |
@Test public void getUncleByBlockHashAndIndexBlockWithUnclesCorrespondingToAnUnknownBlock() { World world = new World(); Account acc1 = new AccountBuilder(world).name("acc1").balance(Coin.valueOf(10000)).build(); Web3Impl web3 = createWeb3(world); Block genesis = world.getBlockChain().getBestBlock(); Block blockA = new... | @Override public BlockResultDTO eth_getUncleByBlockHashAndIndex(String blockHash, String uncleIdx) { BlockResultDTO s = null; try { Block block = blockchain.getBlockByHash(stringHexToByteArray(blockHash)); if (block == null) { return null; } s = getUncleResultDTO(uncleIdx, block); return s; } finally { if (logger.isDeb... | Web3Impl implements Web3 { @Override public BlockResultDTO eth_getUncleByBlockHashAndIndex(String blockHash, String uncleIdx) { BlockResultDTO s = null; try { Block block = blockchain.getBlockByHash(stringHexToByteArray(blockHash)); if (block == null) { return null; } s = getUncleResultDTO(uncleIdx, block); return s; }... | Web3Impl implements Web3 { @Override public BlockResultDTO eth_getUncleByBlockHashAndIndex(String blockHash, String uncleIdx) { BlockResultDTO s = null; try { Block block = blockchain.getBlockByHash(stringHexToByteArray(blockHash)); if (block == null) { return null; } s = getUncleResultDTO(uncleIdx, block); return s; }... | Web3Impl implements Web3 { @Override public BlockResultDTO eth_getUncleByBlockHashAndIndex(String blockHash, String uncleIdx) { BlockResultDTO s = null; try { Block block = blockchain.getBlockByHash(stringHexToByteArray(blockHash)); if (block == null) { return null; } s = getUncleResultDTO(uncleIdx, block); return s; }... | Web3Impl implements Web3 { @Override public BlockResultDTO eth_getUncleByBlockHashAndIndex(String blockHash, String uncleIdx) { BlockResultDTO s = null; try { Block block = blockchain.getBlockByHash(stringHexToByteArray(blockHash)); if (block == null) { return null; } s = getUncleResultDTO(uncleIdx, block); return s; }... |
@Test public void testScriptVersion3() { program = getProgram( "FC01010A" + "0102030405060708090A" + "00" ); try { vm.step(program); } finally { assertTrue(program.isStopped()); } } | public void step(Program aprogram) { steps(aprogram,1); } | VM { public void step(Program aprogram) { steps(aprogram,1); } } | VM { public void step(Program aprogram) { steps(aprogram,1); } VM(VmConfig vmConfig, PrecompiledContracts precompiledContracts); } | VM { public void step(Program aprogram) { steps(aprogram,1); } VM(VmConfig vmConfig, PrecompiledContracts precompiledContracts); void step(Program aprogram); int getVmCounter(); void resetVmCounter(); static long limitedAddToMaxLong(long left, long right); void steps(Program aprogram, long steps); void initDebugData();... | VM { public void step(Program aprogram) { steps(aprogram,1); } VM(VmConfig vmConfig, PrecompiledContracts precompiledContracts); void step(Program aprogram); int getVmCounter(); void resetVmCounter(); static long limitedAddToMaxLong(long left, long right); void steps(Program aprogram, long steps); void initDebugData();... |
@Test public void subscribeToNewHeads() { Channel channel = mock(Channel.class); EthSubscribeNewHeadsParams params = mock(EthSubscribeNewHeadsParams.class); SubscriptionId subscriptionId = emitter.visit(params, channel); assertThat(subscriptionId, notNullValue()); verify(newHeads).subscribe(subscriptionId, channel); } | @Override public SubscriptionId visit(EthSubscribeNewHeadsParams params, Channel channel) { SubscriptionId subscriptionId = new SubscriptionId(); blockHeader.subscribe(subscriptionId, channel); return subscriptionId; } | EthSubscriptionNotificationEmitter implements EthSubscribeParamsVisitor { @Override public SubscriptionId visit(EthSubscribeNewHeadsParams params, Channel channel) { SubscriptionId subscriptionId = new SubscriptionId(); blockHeader.subscribe(subscriptionId, channel); return subscriptionId; } } | EthSubscriptionNotificationEmitter implements EthSubscribeParamsVisitor { @Override public SubscriptionId visit(EthSubscribeNewHeadsParams params, Channel channel) { SubscriptionId subscriptionId = new SubscriptionId(); blockHeader.subscribe(subscriptionId, channel); return subscriptionId; } EthSubscriptionNotification... | EthSubscriptionNotificationEmitter implements EthSubscribeParamsVisitor { @Override public SubscriptionId visit(EthSubscribeNewHeadsParams params, Channel channel) { SubscriptionId subscriptionId = new SubscriptionId(); blockHeader.subscribe(subscriptionId, channel); return subscriptionId; } EthSubscriptionNotification... | EthSubscriptionNotificationEmitter implements EthSubscribeParamsVisitor { @Override public SubscriptionId visit(EthSubscribeNewHeadsParams params, Channel channel) { SubscriptionId subscriptionId = new SubscriptionId(); blockHeader.subscribe(subscriptionId, channel); return subscriptionId; } EthSubscriptionNotification... |
@Test public void subscribeToLogs() { Channel channel = mock(Channel.class); EthSubscribeLogsParams params = mock(EthSubscribeLogsParams.class); SubscriptionId subscriptionId = emitter.visit(params, channel); assertThat(subscriptionId, notNullValue()); verify(logs).subscribe(subscriptionId, channel, params); } | @Override public SubscriptionId visit(EthSubscribeNewHeadsParams params, Channel channel) { SubscriptionId subscriptionId = new SubscriptionId(); blockHeader.subscribe(subscriptionId, channel); return subscriptionId; } | EthSubscriptionNotificationEmitter implements EthSubscribeParamsVisitor { @Override public SubscriptionId visit(EthSubscribeNewHeadsParams params, Channel channel) { SubscriptionId subscriptionId = new SubscriptionId(); blockHeader.subscribe(subscriptionId, channel); return subscriptionId; } } | EthSubscriptionNotificationEmitter implements EthSubscribeParamsVisitor { @Override public SubscriptionId visit(EthSubscribeNewHeadsParams params, Channel channel) { SubscriptionId subscriptionId = new SubscriptionId(); blockHeader.subscribe(subscriptionId, channel); return subscriptionId; } EthSubscriptionNotification... | EthSubscriptionNotificationEmitter implements EthSubscribeParamsVisitor { @Override public SubscriptionId visit(EthSubscribeNewHeadsParams params, Channel channel) { SubscriptionId subscriptionId = new SubscriptionId(); blockHeader.subscribe(subscriptionId, channel); return subscriptionId; } EthSubscriptionNotification... | EthSubscriptionNotificationEmitter implements EthSubscribeParamsVisitor { @Override public SubscriptionId visit(EthSubscribeNewHeadsParams params, Channel channel) { SubscriptionId subscriptionId = new SubscriptionId(); blockHeader.subscribe(subscriptionId, channel); return subscriptionId; } EthSubscriptionNotification... |
@Test public void unsubscribeUnsuccessfully() { SubscriptionId subscriptionId = mock(SubscriptionId.class); boolean unsubscribed = emitter.unsubscribe(subscriptionId); assertThat(unsubscribed, is(false)); verify(newHeads).unsubscribe(subscriptionId); verify(logs).unsubscribe(subscriptionId); } | public boolean unsubscribe(SubscriptionId subscriptionId) { boolean unsubscribedBlockHeader = blockHeader.unsubscribe(subscriptionId); boolean unsubscribedLogs = logs.unsubscribe(subscriptionId); return unsubscribedBlockHeader || unsubscribedLogs; } | EthSubscriptionNotificationEmitter implements EthSubscribeParamsVisitor { public boolean unsubscribe(SubscriptionId subscriptionId) { boolean unsubscribedBlockHeader = blockHeader.unsubscribe(subscriptionId); boolean unsubscribedLogs = logs.unsubscribe(subscriptionId); return unsubscribedBlockHeader || unsubscribedLogs... | EthSubscriptionNotificationEmitter implements EthSubscribeParamsVisitor { public boolean unsubscribe(SubscriptionId subscriptionId) { boolean unsubscribedBlockHeader = blockHeader.unsubscribe(subscriptionId); boolean unsubscribedLogs = logs.unsubscribe(subscriptionId); return unsubscribedBlockHeader || unsubscribedLogs... | EthSubscriptionNotificationEmitter implements EthSubscribeParamsVisitor { public boolean unsubscribe(SubscriptionId subscriptionId) { boolean unsubscribedBlockHeader = blockHeader.unsubscribe(subscriptionId); boolean unsubscribedLogs = logs.unsubscribe(subscriptionId); return unsubscribedBlockHeader || unsubscribedLogs... | EthSubscriptionNotificationEmitter implements EthSubscribeParamsVisitor { public boolean unsubscribe(SubscriptionId subscriptionId) { boolean unsubscribedBlockHeader = blockHeader.unsubscribe(subscriptionId); boolean unsubscribedLogs = logs.unsubscribe(subscriptionId); return unsubscribedBlockHeader || unsubscribedLogs... |
@Test public void unsubscribeSuccessfullyFromNewHeads() { SubscriptionId subscriptionId = mock(SubscriptionId.class); when(newHeads.unsubscribe(subscriptionId)).thenReturn(true); boolean unsubscribed = emitter.unsubscribe(subscriptionId); assertThat(unsubscribed, is(true)); verify(newHeads).unsubscribe(subscriptionId);... | public boolean unsubscribe(SubscriptionId subscriptionId) { boolean unsubscribedBlockHeader = blockHeader.unsubscribe(subscriptionId); boolean unsubscribedLogs = logs.unsubscribe(subscriptionId); return unsubscribedBlockHeader || unsubscribedLogs; } | EthSubscriptionNotificationEmitter implements EthSubscribeParamsVisitor { public boolean unsubscribe(SubscriptionId subscriptionId) { boolean unsubscribedBlockHeader = blockHeader.unsubscribe(subscriptionId); boolean unsubscribedLogs = logs.unsubscribe(subscriptionId); return unsubscribedBlockHeader || unsubscribedLogs... | EthSubscriptionNotificationEmitter implements EthSubscribeParamsVisitor { public boolean unsubscribe(SubscriptionId subscriptionId) { boolean unsubscribedBlockHeader = blockHeader.unsubscribe(subscriptionId); boolean unsubscribedLogs = logs.unsubscribe(subscriptionId); return unsubscribedBlockHeader || unsubscribedLogs... | EthSubscriptionNotificationEmitter implements EthSubscribeParamsVisitor { public boolean unsubscribe(SubscriptionId subscriptionId) { boolean unsubscribedBlockHeader = blockHeader.unsubscribe(subscriptionId); boolean unsubscribedLogs = logs.unsubscribe(subscriptionId); return unsubscribedBlockHeader || unsubscribedLogs... | EthSubscriptionNotificationEmitter implements EthSubscribeParamsVisitor { public boolean unsubscribe(SubscriptionId subscriptionId) { boolean unsubscribedBlockHeader = blockHeader.unsubscribe(subscriptionId); boolean unsubscribedLogs = logs.unsubscribe(subscriptionId); return unsubscribedBlockHeader || unsubscribedLogs... |
@Test public void unsubscribeSuccessfullyFromLogs() { SubscriptionId subscriptionId = mock(SubscriptionId.class); when(logs.unsubscribe(subscriptionId)).thenReturn(true); boolean unsubscribed = emitter.unsubscribe(subscriptionId); assertThat(unsubscribed, is(true)); verify(newHeads).unsubscribe(subscriptionId); verify(... | public boolean unsubscribe(SubscriptionId subscriptionId) { boolean unsubscribedBlockHeader = blockHeader.unsubscribe(subscriptionId); boolean unsubscribedLogs = logs.unsubscribe(subscriptionId); return unsubscribedBlockHeader || unsubscribedLogs; } | EthSubscriptionNotificationEmitter implements EthSubscribeParamsVisitor { public boolean unsubscribe(SubscriptionId subscriptionId) { boolean unsubscribedBlockHeader = blockHeader.unsubscribe(subscriptionId); boolean unsubscribedLogs = logs.unsubscribe(subscriptionId); return unsubscribedBlockHeader || unsubscribedLogs... | EthSubscriptionNotificationEmitter implements EthSubscribeParamsVisitor { public boolean unsubscribe(SubscriptionId subscriptionId) { boolean unsubscribedBlockHeader = blockHeader.unsubscribe(subscriptionId); boolean unsubscribedLogs = logs.unsubscribe(subscriptionId); return unsubscribedBlockHeader || unsubscribedLogs... | EthSubscriptionNotificationEmitter implements EthSubscribeParamsVisitor { public boolean unsubscribe(SubscriptionId subscriptionId) { boolean unsubscribedBlockHeader = blockHeader.unsubscribe(subscriptionId); boolean unsubscribedLogs = logs.unsubscribe(subscriptionId); return unsubscribedBlockHeader || unsubscribedLogs... | EthSubscriptionNotificationEmitter implements EthSubscribeParamsVisitor { public boolean unsubscribe(SubscriptionId subscriptionId) { boolean unsubscribedBlockHeader = blockHeader.unsubscribe(subscriptionId); boolean unsubscribedLogs = logs.unsubscribe(subscriptionId); return unsubscribedBlockHeader || unsubscribedLogs... |
@Test public void unsubscribeChannel() { Channel channel = mock(Channel.class); emitter.unsubscribe(channel); verify(newHeads).unsubscribe(channel); verify(logs).unsubscribe(channel); } | public boolean unsubscribe(SubscriptionId subscriptionId) { boolean unsubscribedBlockHeader = blockHeader.unsubscribe(subscriptionId); boolean unsubscribedLogs = logs.unsubscribe(subscriptionId); return unsubscribedBlockHeader || unsubscribedLogs; } | EthSubscriptionNotificationEmitter implements EthSubscribeParamsVisitor { public boolean unsubscribe(SubscriptionId subscriptionId) { boolean unsubscribedBlockHeader = blockHeader.unsubscribe(subscriptionId); boolean unsubscribedLogs = logs.unsubscribe(subscriptionId); return unsubscribedBlockHeader || unsubscribedLogs... | EthSubscriptionNotificationEmitter implements EthSubscribeParamsVisitor { public boolean unsubscribe(SubscriptionId subscriptionId) { boolean unsubscribedBlockHeader = blockHeader.unsubscribe(subscriptionId); boolean unsubscribedLogs = logs.unsubscribe(subscriptionId); return unsubscribedBlockHeader || unsubscribedLogs... | EthSubscriptionNotificationEmitter implements EthSubscribeParamsVisitor { public boolean unsubscribe(SubscriptionId subscriptionId) { boolean unsubscribedBlockHeader = blockHeader.unsubscribe(subscriptionId); boolean unsubscribedLogs = logs.unsubscribe(subscriptionId); return unsubscribedBlockHeader || unsubscribedLogs... | EthSubscriptionNotificationEmitter implements EthSubscribeParamsVisitor { public boolean unsubscribe(SubscriptionId subscriptionId) { boolean unsubscribedBlockHeader = blockHeader.unsubscribe(subscriptionId); boolean unsubscribedLogs = logs.unsubscribe(subscriptionId); return unsubscribedBlockHeader || unsubscribedLogs... |
@Test public void txpool_content_basic() throws IOException { JsonNode node = txPoolModule.content(); checkFieldIsObject(node,"pending"); checkFieldIsObject(node,"queued"); } | @Override public JsonNode content() { Map<String, JsonNode> contentProps = new HashMap<>(); Map<RskAddress, Map<BigInteger, List<Transaction>>> pendingGrouped = groupTransactions(transactionPool.getPendingTransactions()); Map<RskAddress, Map<BigInteger, List<Transaction>>> queuedGrouped = groupTransactions(transactionP... | TxPoolModuleImpl implements TxPoolModule { @Override public JsonNode content() { Map<String, JsonNode> contentProps = new HashMap<>(); Map<RskAddress, Map<BigInteger, List<Transaction>>> pendingGrouped = groupTransactions(transactionPool.getPendingTransactions()); Map<RskAddress, Map<BigInteger, List<Transaction>>> que... | TxPoolModuleImpl implements TxPoolModule { @Override public JsonNode content() { Map<String, JsonNode> contentProps = new HashMap<>(); Map<RskAddress, Map<BigInteger, List<Transaction>>> pendingGrouped = groupTransactions(transactionPool.getPendingTransactions()); Map<RskAddress, Map<BigInteger, List<Transaction>>> que... | TxPoolModuleImpl implements TxPoolModule { @Override public JsonNode content() { Map<String, JsonNode> contentProps = new HashMap<>(); Map<RskAddress, Map<BigInteger, List<Transaction>>> pendingGrouped = groupTransactions(transactionPool.getPendingTransactions()); Map<RskAddress, Map<BigInteger, List<Transaction>>> que... | TxPoolModuleImpl implements TxPoolModule { @Override public JsonNode content() { Map<String, JsonNode> contentProps = new HashMap<>(); Map<RskAddress, Map<BigInteger, List<Transaction>>> pendingGrouped = groupTransactions(transactionPool.getPendingTransactions()); Map<RskAddress, Map<BigInteger, List<Transaction>>> que... |
@Test public void txpool_inspect_basic() throws IOException { JsonNode node = txPoolModule.inspect(); checkFieldIsObject(node,"pending"); checkFieldIsObject(node,"queued"); } | @Override public JsonNode inspect() { Map<String, JsonNode> contentProps = new HashMap<>(); Map<RskAddress, Map<BigInteger, List<Transaction>>> pendingGrouped = groupTransactions(transactionPool.getPendingTransactions()); Map<RskAddress, Map<BigInteger, List<Transaction>>> queuedGrouped = groupTransactions(transactionP... | TxPoolModuleImpl implements TxPoolModule { @Override public JsonNode inspect() { Map<String, JsonNode> contentProps = new HashMap<>(); Map<RskAddress, Map<BigInteger, List<Transaction>>> pendingGrouped = groupTransactions(transactionPool.getPendingTransactions()); Map<RskAddress, Map<BigInteger, List<Transaction>>> que... | TxPoolModuleImpl implements TxPoolModule { @Override public JsonNode inspect() { Map<String, JsonNode> contentProps = new HashMap<>(); Map<RskAddress, Map<BigInteger, List<Transaction>>> pendingGrouped = groupTransactions(transactionPool.getPendingTransactions()); Map<RskAddress, Map<BigInteger, List<Transaction>>> que... | TxPoolModuleImpl implements TxPoolModule { @Override public JsonNode inspect() { Map<String, JsonNode> contentProps = new HashMap<>(); Map<RskAddress, Map<BigInteger, List<Transaction>>> pendingGrouped = groupTransactions(transactionPool.getPendingTransactions()); Map<RskAddress, Map<BigInteger, List<Transaction>>> que... | TxPoolModuleImpl implements TxPoolModule { @Override public JsonNode inspect() { Map<String, JsonNode> contentProps = new HashMap<>(); Map<RskAddress, Map<BigInteger, List<Transaction>>> pendingGrouped = groupTransactions(transactionPool.getPendingTransactions()); Map<RskAddress, Map<BigInteger, List<Transaction>>> que... |
@Test public void txpool_status_basic() throws IOException { JsonNode node = txPoolModule.status(); checkFieldIsNumber(node,"pending"); checkFieldIsNumber(node,"queued"); } | @Override public JsonNode status() { Map<String, JsonNode> txProps = new HashMap<>(); txProps.put(PENDING, jsonNodeFactory.numberNode(transactionPool.getPendingTransactions().size())); txProps.put(QUEUED, jsonNodeFactory.numberNode(transactionPool.getQueuedTransactions().size())); JsonNode node = jsonNodeFactory.object... | TxPoolModuleImpl implements TxPoolModule { @Override public JsonNode status() { Map<String, JsonNode> txProps = new HashMap<>(); txProps.put(PENDING, jsonNodeFactory.numberNode(transactionPool.getPendingTransactions().size())); txProps.put(QUEUED, jsonNodeFactory.numberNode(transactionPool.getQueuedTransactions().size(... | TxPoolModuleImpl implements TxPoolModule { @Override public JsonNode status() { Map<String, JsonNode> txProps = new HashMap<>(); txProps.put(PENDING, jsonNodeFactory.numberNode(transactionPool.getPendingTransactions().size())); txProps.put(QUEUED, jsonNodeFactory.numberNode(transactionPool.getQueuedTransactions().size(... | TxPoolModuleImpl implements TxPoolModule { @Override public JsonNode status() { Map<String, JsonNode> txProps = new HashMap<>(); txProps.put(PENDING, jsonNodeFactory.numberNode(transactionPool.getPendingTransactions().size())); txProps.put(QUEUED, jsonNodeFactory.numberNode(transactionPool.getQueuedTransactions().size(... | TxPoolModuleImpl implements TxPoolModule { @Override public JsonNode status() { Map<String, JsonNode> txProps = new HashMap<>(); txProps.put(PENDING, jsonNodeFactory.numberNode(transactionPool.getPendingTransactions().size())); txProps.put(QUEUED, jsonNodeFactory.numberNode(transactionPool.getQueuedTransactions().size(... |
@Test public void getUncleByBlockNumberAndIndexBlockWithUncles() { World world = new World(); Web3Impl web3 = createWeb3(world); Block genesis = world.getBlockChain().getBestBlock(); Block blockA = new BlockBuilder(world.getBlockChain(), world.getBridgeSupportFactory(), world.getBlockStore()) .trieStore(world.getTrieSt... | @Override public BlockResultDTO eth_getUncleByBlockNumberAndIndex(String blockId, String uncleIdx) { BlockResultDTO s = null; try { Optional<Block> block = web3InformationRetriever.getBlock(blockId); if (!block.isPresent()) { return null; } s = getUncleResultDTO(uncleIdx, block.get()); return s; } finally { if (logger.... | Web3Impl implements Web3 { @Override public BlockResultDTO eth_getUncleByBlockNumberAndIndex(String blockId, String uncleIdx) { BlockResultDTO s = null; try { Optional<Block> block = web3InformationRetriever.getBlock(blockId); if (!block.isPresent()) { return null; } s = getUncleResultDTO(uncleIdx, block.get()); return... | Web3Impl implements Web3 { @Override public BlockResultDTO eth_getUncleByBlockNumberAndIndex(String blockId, String uncleIdx) { BlockResultDTO s = null; try { Optional<Block> block = web3InformationRetriever.getBlock(blockId); if (!block.isPresent()) { return null; } s = getUncleResultDTO(uncleIdx, block.get()); return... | Web3Impl implements Web3 { @Override public BlockResultDTO eth_getUncleByBlockNumberAndIndex(String blockId, String uncleIdx) { BlockResultDTO s = null; try { Optional<Block> block = web3InformationRetriever.getBlock(blockId); if (!block.isPresent()) { return null; } s = getUncleResultDTO(uncleIdx, block.get()); return... | Web3Impl implements Web3 { @Override public BlockResultDTO eth_getUncleByBlockNumberAndIndex(String blockId, String uncleIdx) { BlockResultDTO s = null; try { Optional<Block> block = web3InformationRetriever.getBlock(blockId); if (!block.isPresent()) { return null; } s = getUncleResultDTO(uncleIdx, block.get()); return... |
@Test public void txpool_content_oneTx() throws Exception { Transaction tx = createSampleTransaction(); when(transactionPool.getPendingTransactions()).thenReturn(Collections.singletonList(tx)); JsonNode node = txPoolModule.content(); checkFieldIsEmpty(node, "queued"); JsonNode pendingNode = checkFieldIsObject(node, "pe... | @Override public JsonNode content() { Map<String, JsonNode> contentProps = new HashMap<>(); Map<RskAddress, Map<BigInteger, List<Transaction>>> pendingGrouped = groupTransactions(transactionPool.getPendingTransactions()); Map<RskAddress, Map<BigInteger, List<Transaction>>> queuedGrouped = groupTransactions(transactionP... | TxPoolModuleImpl implements TxPoolModule { @Override public JsonNode content() { Map<String, JsonNode> contentProps = new HashMap<>(); Map<RskAddress, Map<BigInteger, List<Transaction>>> pendingGrouped = groupTransactions(transactionPool.getPendingTransactions()); Map<RskAddress, Map<BigInteger, List<Transaction>>> que... | TxPoolModuleImpl implements TxPoolModule { @Override public JsonNode content() { Map<String, JsonNode> contentProps = new HashMap<>(); Map<RskAddress, Map<BigInteger, List<Transaction>>> pendingGrouped = groupTransactions(transactionPool.getPendingTransactions()); Map<RskAddress, Map<BigInteger, List<Transaction>>> que... | TxPoolModuleImpl implements TxPoolModule { @Override public JsonNode content() { Map<String, JsonNode> contentProps = new HashMap<>(); Map<RskAddress, Map<BigInteger, List<Transaction>>> pendingGrouped = groupTransactions(transactionPool.getPendingTransactions()); Map<RskAddress, Map<BigInteger, List<Transaction>>> que... | TxPoolModuleImpl implements TxPoolModule { @Override public JsonNode content() { Map<String, JsonNode> contentProps = new HashMap<>(); Map<RskAddress, Map<BigInteger, List<Transaction>>> pendingGrouped = groupTransactions(transactionPool.getPendingTransactions()); Map<RskAddress, Map<BigInteger, List<Transaction>>> que... |
@Test public void txpool_inspect_oneTx() throws Exception { Transaction tx = createSampleTransaction(); when(transactionPool.getPendingTransactions()).thenReturn(Collections.singletonList(tx)); JsonNode node = txPoolModule.inspect(); checkFieldIsEmpty(node, "queued"); JsonNode pendingNode = checkFieldIsObject(node, "pe... | @Override public JsonNode inspect() { Map<String, JsonNode> contentProps = new HashMap<>(); Map<RskAddress, Map<BigInteger, List<Transaction>>> pendingGrouped = groupTransactions(transactionPool.getPendingTransactions()); Map<RskAddress, Map<BigInteger, List<Transaction>>> queuedGrouped = groupTransactions(transactionP... | TxPoolModuleImpl implements TxPoolModule { @Override public JsonNode inspect() { Map<String, JsonNode> contentProps = new HashMap<>(); Map<RskAddress, Map<BigInteger, List<Transaction>>> pendingGrouped = groupTransactions(transactionPool.getPendingTransactions()); Map<RskAddress, Map<BigInteger, List<Transaction>>> que... | TxPoolModuleImpl implements TxPoolModule { @Override public JsonNode inspect() { Map<String, JsonNode> contentProps = new HashMap<>(); Map<RskAddress, Map<BigInteger, List<Transaction>>> pendingGrouped = groupTransactions(transactionPool.getPendingTransactions()); Map<RskAddress, Map<BigInteger, List<Transaction>>> que... | TxPoolModuleImpl implements TxPoolModule { @Override public JsonNode inspect() { Map<String, JsonNode> contentProps = new HashMap<>(); Map<RskAddress, Map<BigInteger, List<Transaction>>> pendingGrouped = groupTransactions(transactionPool.getPendingTransactions()); Map<RskAddress, Map<BigInteger, List<Transaction>>> que... | TxPoolModuleImpl implements TxPoolModule { @Override public JsonNode inspect() { Map<String, JsonNode> contentProps = new HashMap<>(); Map<RskAddress, Map<BigInteger, List<Transaction>>> pendingGrouped = groupTransactions(transactionPool.getPendingTransactions()); Map<RskAddress, Map<BigInteger, List<Transaction>>> que... |
@Test public void txpool_content_sameNonce() throws Exception { Transaction tx1 = createSampleTransaction(); Transaction tx2 = createSampleTransaction(); Transaction tx3 = createSampleTransaction(); List<Transaction> transactions = Arrays.asList(tx1, tx2, tx3); when(transactionPool.getPendingTransactions()).thenReturn(... | @Override public JsonNode content() { Map<String, JsonNode> contentProps = new HashMap<>(); Map<RskAddress, Map<BigInteger, List<Transaction>>> pendingGrouped = groupTransactions(transactionPool.getPendingTransactions()); Map<RskAddress, Map<BigInteger, List<Transaction>>> queuedGrouped = groupTransactions(transactionP... | TxPoolModuleImpl implements TxPoolModule { @Override public JsonNode content() { Map<String, JsonNode> contentProps = new HashMap<>(); Map<RskAddress, Map<BigInteger, List<Transaction>>> pendingGrouped = groupTransactions(transactionPool.getPendingTransactions()); Map<RskAddress, Map<BigInteger, List<Transaction>>> que... | TxPoolModuleImpl implements TxPoolModule { @Override public JsonNode content() { Map<String, JsonNode> contentProps = new HashMap<>(); Map<RskAddress, Map<BigInteger, List<Transaction>>> pendingGrouped = groupTransactions(transactionPool.getPendingTransactions()); Map<RskAddress, Map<BigInteger, List<Transaction>>> que... | TxPoolModuleImpl implements TxPoolModule { @Override public JsonNode content() { Map<String, JsonNode> contentProps = new HashMap<>(); Map<RskAddress, Map<BigInteger, List<Transaction>>> pendingGrouped = groupTransactions(transactionPool.getPendingTransactions()); Map<RskAddress, Map<BigInteger, List<Transaction>>> que... | TxPoolModuleImpl implements TxPoolModule { @Override public JsonNode content() { Map<String, JsonNode> contentProps = new HashMap<>(); Map<RskAddress, Map<BigInteger, List<Transaction>>> pendingGrouped = groupTransactions(transactionPool.getPendingTransactions()); Map<RskAddress, Map<BigInteger, List<Transaction>>> que... |
@Test public void txpool_inspect_sameNonce() throws Exception { Transaction tx1 = createSampleTransaction(); Transaction tx2 = createSampleTransaction(); Transaction tx3 = createSampleTransaction(); List<Transaction> transactions = Arrays.asList(tx1, tx2, tx3); when(transactionPool.getPendingTransactions()).thenReturn(... | @Override public JsonNode inspect() { Map<String, JsonNode> contentProps = new HashMap<>(); Map<RskAddress, Map<BigInteger, List<Transaction>>> pendingGrouped = groupTransactions(transactionPool.getPendingTransactions()); Map<RskAddress, Map<BigInteger, List<Transaction>>> queuedGrouped = groupTransactions(transactionP... | TxPoolModuleImpl implements TxPoolModule { @Override public JsonNode inspect() { Map<String, JsonNode> contentProps = new HashMap<>(); Map<RskAddress, Map<BigInteger, List<Transaction>>> pendingGrouped = groupTransactions(transactionPool.getPendingTransactions()); Map<RskAddress, Map<BigInteger, List<Transaction>>> que... | TxPoolModuleImpl implements TxPoolModule { @Override public JsonNode inspect() { Map<String, JsonNode> contentProps = new HashMap<>(); Map<RskAddress, Map<BigInteger, List<Transaction>>> pendingGrouped = groupTransactions(transactionPool.getPendingTransactions()); Map<RskAddress, Map<BigInteger, List<Transaction>>> que... | TxPoolModuleImpl implements TxPoolModule { @Override public JsonNode inspect() { Map<String, JsonNode> contentProps = new HashMap<>(); Map<RskAddress, Map<BigInteger, List<Transaction>>> pendingGrouped = groupTransactions(transactionPool.getPendingTransactions()); Map<RskAddress, Map<BigInteger, List<Transaction>>> que... | TxPoolModuleImpl implements TxPoolModule { @Override public JsonNode inspect() { Map<String, JsonNode> contentProps = new HashMap<>(); Map<RskAddress, Map<BigInteger, List<Transaction>>> pendingGrouped = groupTransactions(transactionPool.getPendingTransactions()); Map<RskAddress, Map<BigInteger, List<Transaction>>> que... |
@Test public void txpool_content_sameSender() throws Exception { Transaction tx1 = createSampleTransaction(0, 1, 1, 0); Transaction tx2 = createSampleTransaction(0, 2, 1, 1); Transaction tx3 = createSampleTransaction(0, 3, 1, 2); Transaction tx4 = createSampleTransaction(1, 3, 1, 0); Transaction tx5 = createSampleTrans... | @Override public JsonNode content() { Map<String, JsonNode> contentProps = new HashMap<>(); Map<RskAddress, Map<BigInteger, List<Transaction>>> pendingGrouped = groupTransactions(transactionPool.getPendingTransactions()); Map<RskAddress, Map<BigInteger, List<Transaction>>> queuedGrouped = groupTransactions(transactionP... | TxPoolModuleImpl implements TxPoolModule { @Override public JsonNode content() { Map<String, JsonNode> contentProps = new HashMap<>(); Map<RskAddress, Map<BigInteger, List<Transaction>>> pendingGrouped = groupTransactions(transactionPool.getPendingTransactions()); Map<RskAddress, Map<BigInteger, List<Transaction>>> que... | TxPoolModuleImpl implements TxPoolModule { @Override public JsonNode content() { Map<String, JsonNode> contentProps = new HashMap<>(); Map<RskAddress, Map<BigInteger, List<Transaction>>> pendingGrouped = groupTransactions(transactionPool.getPendingTransactions()); Map<RskAddress, Map<BigInteger, List<Transaction>>> que... | TxPoolModuleImpl implements TxPoolModule { @Override public JsonNode content() { Map<String, JsonNode> contentProps = new HashMap<>(); Map<RskAddress, Map<BigInteger, List<Transaction>>> pendingGrouped = groupTransactions(transactionPool.getPendingTransactions()); Map<RskAddress, Map<BigInteger, List<Transaction>>> que... | TxPoolModuleImpl implements TxPoolModule { @Override public JsonNode content() { Map<String, JsonNode> contentProps = new HashMap<>(); Map<RskAddress, Map<BigInteger, List<Transaction>>> pendingGrouped = groupTransactions(transactionPool.getPendingTransactions()); Map<RskAddress, Map<BigInteger, List<Transaction>>> que... |
@Test public void txpool_inspect_sameSender() throws Exception { Transaction tx1 = createSampleTransaction(0, 1, 1, 0); Transaction tx2 = createSampleTransaction(0, 2, 1, 1); Transaction tx3 = createSampleTransaction(0, 3, 1, 2); Transaction tx4 = createSampleTransaction(1, 3, 1, 0); Transaction tx5 = createSampleTrans... | @Override public JsonNode inspect() { Map<String, JsonNode> contentProps = new HashMap<>(); Map<RskAddress, Map<BigInteger, List<Transaction>>> pendingGrouped = groupTransactions(transactionPool.getPendingTransactions()); Map<RskAddress, Map<BigInteger, List<Transaction>>> queuedGrouped = groupTransactions(transactionP... | TxPoolModuleImpl implements TxPoolModule { @Override public JsonNode inspect() { Map<String, JsonNode> contentProps = new HashMap<>(); Map<RskAddress, Map<BigInteger, List<Transaction>>> pendingGrouped = groupTransactions(transactionPool.getPendingTransactions()); Map<RskAddress, Map<BigInteger, List<Transaction>>> que... | TxPoolModuleImpl implements TxPoolModule { @Override public JsonNode inspect() { Map<String, JsonNode> contentProps = new HashMap<>(); Map<RskAddress, Map<BigInteger, List<Transaction>>> pendingGrouped = groupTransactions(transactionPool.getPendingTransactions()); Map<RskAddress, Map<BigInteger, List<Transaction>>> que... | TxPoolModuleImpl implements TxPoolModule { @Override public JsonNode inspect() { Map<String, JsonNode> contentProps = new HashMap<>(); Map<RskAddress, Map<BigInteger, List<Transaction>>> pendingGrouped = groupTransactions(transactionPool.getPendingTransactions()); Map<RskAddress, Map<BigInteger, List<Transaction>>> que... | TxPoolModuleImpl implements TxPoolModule { @Override public JsonNode inspect() { Map<String, JsonNode> contentProps = new HashMap<>(); Map<RskAddress, Map<BigInteger, List<Transaction>>> pendingGrouped = groupTransactions(transactionPool.getPendingTransactions()); Map<RskAddress, Map<BigInteger, List<Transaction>>> que... |
@Test public void txpool_content_manyTxs() throws Exception { Transaction tx1 = createSampleTransaction(0, 1, 1, 0); Transaction tx2 = createSampleTransaction(0, 2, 1, 0); Transaction tx3 = createSampleTransaction(0, 3, 1, 0); Transaction tx4 = createSampleTransaction(1, 3, 1, 0); Transaction tx5 = createSampleTransact... | @Override public JsonNode content() { Map<String, JsonNode> contentProps = new HashMap<>(); Map<RskAddress, Map<BigInteger, List<Transaction>>> pendingGrouped = groupTransactions(transactionPool.getPendingTransactions()); Map<RskAddress, Map<BigInteger, List<Transaction>>> queuedGrouped = groupTransactions(transactionP... | TxPoolModuleImpl implements TxPoolModule { @Override public JsonNode content() { Map<String, JsonNode> contentProps = new HashMap<>(); Map<RskAddress, Map<BigInteger, List<Transaction>>> pendingGrouped = groupTransactions(transactionPool.getPendingTransactions()); Map<RskAddress, Map<BigInteger, List<Transaction>>> que... | TxPoolModuleImpl implements TxPoolModule { @Override public JsonNode content() { Map<String, JsonNode> contentProps = new HashMap<>(); Map<RskAddress, Map<BigInteger, List<Transaction>>> pendingGrouped = groupTransactions(transactionPool.getPendingTransactions()); Map<RskAddress, Map<BigInteger, List<Transaction>>> que... | TxPoolModuleImpl implements TxPoolModule { @Override public JsonNode content() { Map<String, JsonNode> contentProps = new HashMap<>(); Map<RskAddress, Map<BigInteger, List<Transaction>>> pendingGrouped = groupTransactions(transactionPool.getPendingTransactions()); Map<RskAddress, Map<BigInteger, List<Transaction>>> que... | TxPoolModuleImpl implements TxPoolModule { @Override public JsonNode content() { Map<String, JsonNode> contentProps = new HashMap<>(); Map<RskAddress, Map<BigInteger, List<Transaction>>> pendingGrouped = groupTransactions(transactionPool.getPendingTransactions()); Map<RskAddress, Map<BigInteger, List<Transaction>>> que... |
@Test public void txpool_inspect_manyTxs() throws Exception { Transaction tx1 = createSampleTransaction(0, 1, 1, 0); Transaction tx2 = createSampleTransaction(0, 2, 1, 0); Transaction tx3 = createSampleTransaction(0, 3, 1, 0); Transaction tx4 = createSampleTransaction(1, 3, 1, 0); Transaction tx5 = createSampleTransact... | @Override public JsonNode inspect() { Map<String, JsonNode> contentProps = new HashMap<>(); Map<RskAddress, Map<BigInteger, List<Transaction>>> pendingGrouped = groupTransactions(transactionPool.getPendingTransactions()); Map<RskAddress, Map<BigInteger, List<Transaction>>> queuedGrouped = groupTransactions(transactionP... | TxPoolModuleImpl implements TxPoolModule { @Override public JsonNode inspect() { Map<String, JsonNode> contentProps = new HashMap<>(); Map<RskAddress, Map<BigInteger, List<Transaction>>> pendingGrouped = groupTransactions(transactionPool.getPendingTransactions()); Map<RskAddress, Map<BigInteger, List<Transaction>>> que... | TxPoolModuleImpl implements TxPoolModule { @Override public JsonNode inspect() { Map<String, JsonNode> contentProps = new HashMap<>(); Map<RskAddress, Map<BigInteger, List<Transaction>>> pendingGrouped = groupTransactions(transactionPool.getPendingTransactions()); Map<RskAddress, Map<BigInteger, List<Transaction>>> que... | TxPoolModuleImpl implements TxPoolModule { @Override public JsonNode inspect() { Map<String, JsonNode> contentProps = new HashMap<>(); Map<RskAddress, Map<BigInteger, List<Transaction>>> pendingGrouped = groupTransactions(transactionPool.getPendingTransactions()); Map<RskAddress, Map<BigInteger, List<Transaction>>> que... | TxPoolModuleImpl implements TxPoolModule { @Override public JsonNode inspect() { Map<String, JsonNode> contentProps = new HashMap<>(); Map<RskAddress, Map<BigInteger, List<Transaction>>> pendingGrouped = groupTransactions(transactionPool.getPendingTransactions()); Map<RskAddress, Map<BigInteger, List<Transaction>>> que... |
@Test public void txpool_status_oneTx() throws Exception { Transaction tx = createSampleTransaction(); when(transactionPool.getPendingTransactions()).thenReturn(Collections.singletonList(tx)); JsonNode node = txPoolModule.status(); JsonNode queuedNode = checkFieldIsNumber(node, "queued"); JsonNode pendingNode = checkFi... | @Override public JsonNode status() { Map<String, JsonNode> txProps = new HashMap<>(); txProps.put(PENDING, jsonNodeFactory.numberNode(transactionPool.getPendingTransactions().size())); txProps.put(QUEUED, jsonNodeFactory.numberNode(transactionPool.getQueuedTransactions().size())); JsonNode node = jsonNodeFactory.object... | TxPoolModuleImpl implements TxPoolModule { @Override public JsonNode status() { Map<String, JsonNode> txProps = new HashMap<>(); txProps.put(PENDING, jsonNodeFactory.numberNode(transactionPool.getPendingTransactions().size())); txProps.put(QUEUED, jsonNodeFactory.numberNode(transactionPool.getQueuedTransactions().size(... | TxPoolModuleImpl implements TxPoolModule { @Override public JsonNode status() { Map<String, JsonNode> txProps = new HashMap<>(); txProps.put(PENDING, jsonNodeFactory.numberNode(transactionPool.getPendingTransactions().size())); txProps.put(QUEUED, jsonNodeFactory.numberNode(transactionPool.getQueuedTransactions().size(... | TxPoolModuleImpl implements TxPoolModule { @Override public JsonNode status() { Map<String, JsonNode> txProps = new HashMap<>(); txProps.put(PENDING, jsonNodeFactory.numberNode(transactionPool.getPendingTransactions().size())); txProps.put(QUEUED, jsonNodeFactory.numberNode(transactionPool.getQueuedTransactions().size(... | TxPoolModuleImpl implements TxPoolModule { @Override public JsonNode status() { Map<String, JsonNode> txProps = new HashMap<>(); txProps.put(PENDING, jsonNodeFactory.numberNode(transactionPool.getPendingTransactions().size())); txProps.put(QUEUED, jsonNodeFactory.numberNode(transactionPool.getQueuedTransactions().size(... |
@Test public void txpool_status_manyPending() throws Exception { Transaction tx1 = createSampleTransaction(); Transaction tx2 = createSampleTransaction(); Transaction tx3 = createSampleTransaction(); List<Transaction> transactions = Arrays.asList(tx1, tx2, tx3); when(transactionPool.getPendingTransactions()).thenReturn... | @Override public JsonNode status() { Map<String, JsonNode> txProps = new HashMap<>(); txProps.put(PENDING, jsonNodeFactory.numberNode(transactionPool.getPendingTransactions().size())); txProps.put(QUEUED, jsonNodeFactory.numberNode(transactionPool.getQueuedTransactions().size())); JsonNode node = jsonNodeFactory.object... | TxPoolModuleImpl implements TxPoolModule { @Override public JsonNode status() { Map<String, JsonNode> txProps = new HashMap<>(); txProps.put(PENDING, jsonNodeFactory.numberNode(transactionPool.getPendingTransactions().size())); txProps.put(QUEUED, jsonNodeFactory.numberNode(transactionPool.getQueuedTransactions().size(... | TxPoolModuleImpl implements TxPoolModule { @Override public JsonNode status() { Map<String, JsonNode> txProps = new HashMap<>(); txProps.put(PENDING, jsonNodeFactory.numberNode(transactionPool.getPendingTransactions().size())); txProps.put(QUEUED, jsonNodeFactory.numberNode(transactionPool.getQueuedTransactions().size(... | TxPoolModuleImpl implements TxPoolModule { @Override public JsonNode status() { Map<String, JsonNode> txProps = new HashMap<>(); txProps.put(PENDING, jsonNodeFactory.numberNode(transactionPool.getPendingTransactions().size())); txProps.put(QUEUED, jsonNodeFactory.numberNode(transactionPool.getQueuedTransactions().size(... | TxPoolModuleImpl implements TxPoolModule { @Override public JsonNode status() { Map<String, JsonNode> txProps = new HashMap<>(); txProps.put(PENDING, jsonNodeFactory.numberNode(transactionPool.getPendingTransactions().size())); txProps.put(QUEUED, jsonNodeFactory.numberNode(transactionPool.getQueuedTransactions().size(... |
@Test public void getUncleByBlockNumberAndIndexBlockWithUnclesCorrespondingToAnUnknownBlock() { World world = new World(); Account acc1 = new AccountBuilder(world).name("acc1").balance(Coin.valueOf(10000)).build(); Web3Impl web3 = createWeb3(world); Block genesis = world.getBlockChain().getBestBlock(); Block blockA = n... | @Override public BlockResultDTO eth_getUncleByBlockNumberAndIndex(String blockId, String uncleIdx) { BlockResultDTO s = null; try { Optional<Block> block = web3InformationRetriever.getBlock(blockId); if (!block.isPresent()) { return null; } s = getUncleResultDTO(uncleIdx, block.get()); return s; } finally { if (logger.... | Web3Impl implements Web3 { @Override public BlockResultDTO eth_getUncleByBlockNumberAndIndex(String blockId, String uncleIdx) { BlockResultDTO s = null; try { Optional<Block> block = web3InformationRetriever.getBlock(blockId); if (!block.isPresent()) { return null; } s = getUncleResultDTO(uncleIdx, block.get()); return... | Web3Impl implements Web3 { @Override public BlockResultDTO eth_getUncleByBlockNumberAndIndex(String blockId, String uncleIdx) { BlockResultDTO s = null; try { Optional<Block> block = web3InformationRetriever.getBlock(blockId); if (!block.isPresent()) { return null; } s = getUncleResultDTO(uncleIdx, block.get()); return... | Web3Impl implements Web3 { @Override public BlockResultDTO eth_getUncleByBlockNumberAndIndex(String blockId, String uncleIdx) { BlockResultDTO s = null; try { Optional<Block> block = web3InformationRetriever.getBlock(blockId); if (!block.isPresent()) { return null; } s = getUncleResultDTO(uncleIdx, block.get()); return... | Web3Impl implements Web3 { @Override public BlockResultDTO eth_getUncleByBlockNumberAndIndex(String blockId, String uncleIdx) { BlockResultDTO s = null; try { Optional<Block> block = web3InformationRetriever.getBlock(blockId); if (!block.isPresent()) { return null; } s = getUncleResultDTO(uncleIdx, block.get()); return... |
@Test public void getToAddressWhenValueIsNull() throws Exception { Web3.CallArguments args = new Web3.CallArguments(); CallArgumentsToByteArray byteArrayArgs = new CallArgumentsToByteArray(args); Assert.assertNull(byteArrayArgs.getToAddress()); } | public byte[] getToAddress() { byte[] toAddress = null; if (args.to != null) { toAddress = stringHexToByteArray(args.to); } return toAddress; } | CallArgumentsToByteArray { public byte[] getToAddress() { byte[] toAddress = null; if (args.to != null) { toAddress = stringHexToByteArray(args.to); } return toAddress; } } | CallArgumentsToByteArray { public byte[] getToAddress() { byte[] toAddress = null; if (args.to != null) { toAddress = stringHexToByteArray(args.to); } return toAddress; } CallArgumentsToByteArray(Web3.CallArguments args); } | CallArgumentsToByteArray { public byte[] getToAddress() { byte[] toAddress = null; if (args.to != null) { toAddress = stringHexToByteArray(args.to); } return toAddress; } CallArgumentsToByteArray(Web3.CallArguments args); byte[] getGasPrice(); byte[] getGasLimit(); byte[] getToAddress(); byte[] getValue(); byte[] getDa... | CallArgumentsToByteArray { public byte[] getToAddress() { byte[] toAddress = null; if (args.to != null) { toAddress = stringHexToByteArray(args.to); } return toAddress; } CallArgumentsToByteArray(Web3.CallArguments args); byte[] getGasPrice(); byte[] getGasLimit(); byte[] getToAddress(); byte[] getValue(); byte[] getDa... |
@Test public void txpool_status_manyTxs() throws Exception { Transaction tx1 = createSampleTransaction(); Transaction tx2 = createSampleTransaction(); Transaction tx3 = createSampleTransaction(); Transaction tx4 = createSampleTransaction(); List<Transaction> transactions = Arrays.asList(tx1, tx2, tx3); List<Transaction... | @Override public JsonNode status() { Map<String, JsonNode> txProps = new HashMap<>(); txProps.put(PENDING, jsonNodeFactory.numberNode(transactionPool.getPendingTransactions().size())); txProps.put(QUEUED, jsonNodeFactory.numberNode(transactionPool.getQueuedTransactions().size())); JsonNode node = jsonNodeFactory.object... | TxPoolModuleImpl implements TxPoolModule { @Override public JsonNode status() { Map<String, JsonNode> txProps = new HashMap<>(); txProps.put(PENDING, jsonNodeFactory.numberNode(transactionPool.getPendingTransactions().size())); txProps.put(QUEUED, jsonNodeFactory.numberNode(transactionPool.getQueuedTransactions().size(... | TxPoolModuleImpl implements TxPoolModule { @Override public JsonNode status() { Map<String, JsonNode> txProps = new HashMap<>(); txProps.put(PENDING, jsonNodeFactory.numberNode(transactionPool.getPendingTransactions().size())); txProps.put(QUEUED, jsonNodeFactory.numberNode(transactionPool.getQueuedTransactions().size(... | TxPoolModuleImpl implements TxPoolModule { @Override public JsonNode status() { Map<String, JsonNode> txProps = new HashMap<>(); txProps.put(PENDING, jsonNodeFactory.numberNode(transactionPool.getPendingTransactions().size())); txProps.put(QUEUED, jsonNodeFactory.numberNode(transactionPool.getQueuedTransactions().size(... | TxPoolModuleImpl implements TxPoolModule { @Override public JsonNode status() { Map<String, JsonNode> txProps = new HashMap<>(); txProps.put(PENDING, jsonNodeFactory.numberNode(transactionPool.getPendingTransactions().size())); txProps.put(QUEUED, jsonNodeFactory.numberNode(transactionPool.getQueuedTransactions().size(... |
@Test public void debug_wireProtocolQueueSize_basic() throws IOException { String result = debugModule.wireProtocolQueueSize(); try { TypeConverter.JSonHexToLong(result); } catch (NumberFormatException e) { Assert.fail("This method is not returning a 0x Long"); } } | @Override public String wireProtocolQueueSize() { long n = messageHandler.getMessageQueueSize(); return TypeConverter.toQuantityJsonHex(n); } | DebugModuleImpl implements DebugModule { @Override public String wireProtocolQueueSize() { long n = messageHandler.getMessageQueueSize(); return TypeConverter.toQuantityJsonHex(n); } } | DebugModuleImpl implements DebugModule { @Override public String wireProtocolQueueSize() { long n = messageHandler.getMessageQueueSize(); return TypeConverter.toQuantityJsonHex(n); } DebugModuleImpl(
BlockStore blockStore,
ReceiptStore receiptStore,
MessageHandler messageHandler,
... | DebugModuleImpl implements DebugModule { @Override public String wireProtocolQueueSize() { long n = messageHandler.getMessageQueueSize(); return TypeConverter.toQuantityJsonHex(n); } DebugModuleImpl(
BlockStore blockStore,
ReceiptStore receiptStore,
MessageHandler messageHandler,
... | DebugModuleImpl implements DebugModule { @Override public String wireProtocolQueueSize() { long n = messageHandler.getMessageQueueSize(); return TypeConverter.toQuantityJsonHex(n); } DebugModuleImpl(
BlockStore blockStore,
ReceiptStore receiptStore,
MessageHandler messageHandler,
... |
@Test public void debug_wireProtocolQueueSize_value() throws IOException { when(messageHandler.getMessageQueueSize()).thenReturn(5L); String result = debugModule.wireProtocolQueueSize(); try { long value = TypeConverter.JSonHexToLong(result); Assert.assertEquals(5L, value); } catch (NumberFormatException e) { Assert.fa... | @Override public String wireProtocolQueueSize() { long n = messageHandler.getMessageQueueSize(); return TypeConverter.toQuantityJsonHex(n); } | DebugModuleImpl implements DebugModule { @Override public String wireProtocolQueueSize() { long n = messageHandler.getMessageQueueSize(); return TypeConverter.toQuantityJsonHex(n); } } | DebugModuleImpl implements DebugModule { @Override public String wireProtocolQueueSize() { long n = messageHandler.getMessageQueueSize(); return TypeConverter.toQuantityJsonHex(n); } DebugModuleImpl(
BlockStore blockStore,
ReceiptStore receiptStore,
MessageHandler messageHandler,
... | DebugModuleImpl implements DebugModule { @Override public String wireProtocolQueueSize() { long n = messageHandler.getMessageQueueSize(); return TypeConverter.toQuantityJsonHex(n); } DebugModuleImpl(
BlockStore blockStore,
ReceiptStore receiptStore,
MessageHandler messageHandler,
... | DebugModuleImpl implements DebugModule { @Override public String wireProtocolQueueSize() { long n = messageHandler.getMessageQueueSize(); return TypeConverter.toQuantityJsonHex(n); } DebugModuleImpl(
BlockStore blockStore,
ReceiptStore receiptStore,
MessageHandler messageHandler,
... |
@Test public void debug_traceTransaction_retrieveUnknownTransactionAsNull() throws Exception { byte[] hash = stringHexToByteArray("0x00"); when(receiptStore.getAll(hash)).thenReturn(Collections.emptyList()); when(receiptStore.getInMainChain(hash, blockStore)).thenReturn(null); JsonNode result = debugModule.traceTransac... | @Override public JsonNode traceTransaction(String transactionHash, Map<String, String> traceOptions) throws Exception { logger.trace("debug_traceTransaction({}, {})", transactionHash, traceOptions); if (traceOptions != null && !traceOptions.isEmpty()) { logger.warn("Received {} trace options. For now trace options are ... | DebugModuleImpl implements DebugModule { @Override public JsonNode traceTransaction(String transactionHash, Map<String, String> traceOptions) throws Exception { logger.trace("debug_traceTransaction({}, {})", transactionHash, traceOptions); if (traceOptions != null && !traceOptions.isEmpty()) { logger.warn("Received {} ... | DebugModuleImpl implements DebugModule { @Override public JsonNode traceTransaction(String transactionHash, Map<String, String> traceOptions) throws Exception { logger.trace("debug_traceTransaction({}, {})", transactionHash, traceOptions); if (traceOptions != null && !traceOptions.isEmpty()) { logger.warn("Received {} ... | DebugModuleImpl implements DebugModule { @Override public JsonNode traceTransaction(String transactionHash, Map<String, String> traceOptions) throws Exception { logger.trace("debug_traceTransaction({}, {})", transactionHash, traceOptions); if (traceOptions != null && !traceOptions.isEmpty()) { logger.warn("Received {} ... | DebugModuleImpl implements DebugModule { @Override public JsonNode traceTransaction(String transactionHash, Map<String, String> traceOptions) throws Exception { logger.trace("debug_traceTransaction({}, {})", transactionHash, traceOptions); if (traceOptions != null && !traceOptions.isEmpty()) { logger.warn("Received {} ... |
@Test public void debug_traceTransaction_retrieveSimpleContractCreationTrace() throws Exception { DslParser parser = DslParser.fromResource("dsl/contracts01.txt"); ReceiptStore receiptStore = new ReceiptStoreImpl(new HashMapDB()); World world = new World(receiptStore); WorldDslProcessor processor = new WorldDslProcesso... | @Override public JsonNode traceTransaction(String transactionHash, Map<String, String> traceOptions) throws Exception { logger.trace("debug_traceTransaction({}, {})", transactionHash, traceOptions); if (traceOptions != null && !traceOptions.isEmpty()) { logger.warn("Received {} trace options. For now trace options are ... | DebugModuleImpl implements DebugModule { @Override public JsonNode traceTransaction(String transactionHash, Map<String, String> traceOptions) throws Exception { logger.trace("debug_traceTransaction({}, {})", transactionHash, traceOptions); if (traceOptions != null && !traceOptions.isEmpty()) { logger.warn("Received {} ... | DebugModuleImpl implements DebugModule { @Override public JsonNode traceTransaction(String transactionHash, Map<String, String> traceOptions) throws Exception { logger.trace("debug_traceTransaction({}, {})", transactionHash, traceOptions); if (traceOptions != null && !traceOptions.isEmpty()) { logger.warn("Received {} ... | DebugModuleImpl implements DebugModule { @Override public JsonNode traceTransaction(String transactionHash, Map<String, String> traceOptions) throws Exception { logger.trace("debug_traceTransaction({}, {})", transactionHash, traceOptions); if (traceOptions != null && !traceOptions.isEmpty()) { logger.warn("Received {} ... | DebugModuleImpl implements DebugModule { @Override public JsonNode traceTransaction(String transactionHash, Map<String, String> traceOptions) throws Exception { logger.trace("debug_traceTransaction({}, {})", transactionHash, traceOptions); if (traceOptions != null && !traceOptions.isEmpty()) { logger.warn("Received {} ... |
@Test public void debug_traceTransaction_retrieveEmptyContractCreationTrace() throws Exception { DslParser parser = DslParser.fromResource("dsl/contracts09.txt"); ReceiptStore receiptStore = new ReceiptStoreImpl(new HashMapDB()); World world = new World(receiptStore); WorldDslProcessor processor = new WorldDslProcessor... | @Override public JsonNode traceTransaction(String transactionHash, Map<String, String> traceOptions) throws Exception { logger.trace("debug_traceTransaction({}, {})", transactionHash, traceOptions); if (traceOptions != null && !traceOptions.isEmpty()) { logger.warn("Received {} trace options. For now trace options are ... | DebugModuleImpl implements DebugModule { @Override public JsonNode traceTransaction(String transactionHash, Map<String, String> traceOptions) throws Exception { logger.trace("debug_traceTransaction({}, {})", transactionHash, traceOptions); if (traceOptions != null && !traceOptions.isEmpty()) { logger.warn("Received {} ... | DebugModuleImpl implements DebugModule { @Override public JsonNode traceTransaction(String transactionHash, Map<String, String> traceOptions) throws Exception { logger.trace("debug_traceTransaction({}, {})", transactionHash, traceOptions); if (traceOptions != null && !traceOptions.isEmpty()) { logger.warn("Received {} ... | DebugModuleImpl implements DebugModule { @Override public JsonNode traceTransaction(String transactionHash, Map<String, String> traceOptions) throws Exception { logger.trace("debug_traceTransaction({}, {})", transactionHash, traceOptions); if (traceOptions != null && !traceOptions.isEmpty()) { logger.warn("Received {} ... | DebugModuleImpl implements DebugModule { @Override public JsonNode traceTransaction(String transactionHash, Map<String, String> traceOptions) throws Exception { logger.trace("debug_traceTransaction({}, {})", transactionHash, traceOptions); if (traceOptions != null && !traceOptions.isEmpty()) { logger.warn("Received {} ... |
@Test public void debug_traceTransaction_retrieveSimpleContractInvocationTrace() throws Exception { DslParser parser = DslParser.fromResource("dsl/contracts02.txt"); ReceiptStore receiptStore = new ReceiptStoreImpl(new HashMapDB()); World world = new World(receiptStore); WorldDslProcessor processor = new WorldDslProces... | @Override public JsonNode traceTransaction(String transactionHash, Map<String, String> traceOptions) throws Exception { logger.trace("debug_traceTransaction({}, {})", transactionHash, traceOptions); if (traceOptions != null && !traceOptions.isEmpty()) { logger.warn("Received {} trace options. For now trace options are ... | DebugModuleImpl implements DebugModule { @Override public JsonNode traceTransaction(String transactionHash, Map<String, String> traceOptions) throws Exception { logger.trace("debug_traceTransaction({}, {})", transactionHash, traceOptions); if (traceOptions != null && !traceOptions.isEmpty()) { logger.warn("Received {} ... | DebugModuleImpl implements DebugModule { @Override public JsonNode traceTransaction(String transactionHash, Map<String, String> traceOptions) throws Exception { logger.trace("debug_traceTransaction({}, {})", transactionHash, traceOptions); if (traceOptions != null && !traceOptions.isEmpty()) { logger.warn("Received {} ... | DebugModuleImpl implements DebugModule { @Override public JsonNode traceTransaction(String transactionHash, Map<String, String> traceOptions) throws Exception { logger.trace("debug_traceTransaction({}, {})", transactionHash, traceOptions); if (traceOptions != null && !traceOptions.isEmpty()) { logger.warn("Received {} ... | DebugModuleImpl implements DebugModule { @Override public JsonNode traceTransaction(String transactionHash, Map<String, String> traceOptions) throws Exception { logger.trace("debug_traceTransaction({}, {})", transactionHash, traceOptions); if (traceOptions != null && !traceOptions.isEmpty()) { logger.warn("Received {} ... |
@Test public void debug_traceTransaction_retrieveSimpleAccountTransfer() throws Exception { DslParser parser = DslParser.fromResource("dsl/transfers01.txt"); ReceiptStore receiptStore = new ReceiptStoreImpl(new HashMapDB()); World world = new World(receiptStore); WorldDslProcessor processor = new WorldDslProcessor(worl... | @Override public JsonNode traceTransaction(String transactionHash, Map<String, String> traceOptions) throws Exception { logger.trace("debug_traceTransaction({}, {})", transactionHash, traceOptions); if (traceOptions != null && !traceOptions.isEmpty()) { logger.warn("Received {} trace options. For now trace options are ... | DebugModuleImpl implements DebugModule { @Override public JsonNode traceTransaction(String transactionHash, Map<String, String> traceOptions) throws Exception { logger.trace("debug_traceTransaction({}, {})", transactionHash, traceOptions); if (traceOptions != null && !traceOptions.isEmpty()) { logger.warn("Received {} ... | DebugModuleImpl implements DebugModule { @Override public JsonNode traceTransaction(String transactionHash, Map<String, String> traceOptions) throws Exception { logger.trace("debug_traceTransaction({}, {})", transactionHash, traceOptions); if (traceOptions != null && !traceOptions.isEmpty()) { logger.warn("Received {} ... | DebugModuleImpl implements DebugModule { @Override public JsonNode traceTransaction(String transactionHash, Map<String, String> traceOptions) throws Exception { logger.trace("debug_traceTransaction({}, {})", transactionHash, traceOptions); if (traceOptions != null && !traceOptions.isEmpty()) { logger.warn("Received {} ... | DebugModuleImpl implements DebugModule { @Override public JsonNode traceTransaction(String transactionHash, Map<String, String> traceOptions) throws Exception { logger.trace("debug_traceTransaction({}, {})", transactionHash, traceOptions); if (traceOptions != null && !traceOptions.isEmpty()) { logger.warn("Received {} ... |
@Test public void debug_traceTransaction_retrieveSimpleAccountTransferWithTraceOptions() throws Exception { DslParser parser = DslParser.fromResource("dsl/transfers01.txt"); ReceiptStore receiptStore = new ReceiptStoreImpl(new HashMapDB()); World world = new World(receiptStore); WorldDslProcessor processor = new WorldD... | @Override public JsonNode traceTransaction(String transactionHash, Map<String, String> traceOptions) throws Exception { logger.trace("debug_traceTransaction({}, {})", transactionHash, traceOptions); if (traceOptions != null && !traceOptions.isEmpty()) { logger.warn("Received {} trace options. For now trace options are ... | DebugModuleImpl implements DebugModule { @Override public JsonNode traceTransaction(String transactionHash, Map<String, String> traceOptions) throws Exception { logger.trace("debug_traceTransaction({}, {})", transactionHash, traceOptions); if (traceOptions != null && !traceOptions.isEmpty()) { logger.warn("Received {} ... | DebugModuleImpl implements DebugModule { @Override public JsonNode traceTransaction(String transactionHash, Map<String, String> traceOptions) throws Exception { logger.trace("debug_traceTransaction({}, {})", transactionHash, traceOptions); if (traceOptions != null && !traceOptions.isEmpty()) { logger.warn("Received {} ... | DebugModuleImpl implements DebugModule { @Override public JsonNode traceTransaction(String transactionHash, Map<String, String> traceOptions) throws Exception { logger.trace("debug_traceTransaction({}, {})", transactionHash, traceOptions); if (traceOptions != null && !traceOptions.isEmpty()) { logger.warn("Received {} ... | DebugModuleImpl implements DebugModule { @Override public JsonNode traceTransaction(String transactionHash, Map<String, String> traceOptions) throws Exception { logger.trace("debug_traceTransaction({}, {})", transactionHash, traceOptions); if (traceOptions != null && !traceOptions.isEmpty()) { logger.warn("Received {} ... |
@Test public void callSmokeTest() { Web3.CallArguments args = new Web3.CallArguments(); BlockResult blockResult = mock(BlockResult.class); Block block = mock(Block.class); ExecutionBlockRetriever retriever = mock(ExecutionBlockRetriever.class); when(retriever.getExecutionBlock_workaround("latest")) .thenReturn(blockRes... | public String call(Web3.CallArguments args, String bnOrId) { String s = null; try { BlockResult blockResult = executionBlockRetriever.getExecutionBlock_workaround(bnOrId); ProgramResult res; if (blockResult.getFinalState() != null) { res = callConstant_workaround(args, blockResult); } else { res = callConstant(args, bl... | EthModule implements EthModuleWallet, EthModuleTransaction { public String call(Web3.CallArguments args, String bnOrId) { String s = null; try { BlockResult blockResult = executionBlockRetriever.getExecutionBlock_workaround(bnOrId); ProgramResult res; if (blockResult.getFinalState() != null) { res = callConstant_workar... | EthModule implements EthModuleWallet, EthModuleTransaction { public String call(Web3.CallArguments args, String bnOrId) { String s = null; try { BlockResult blockResult = executionBlockRetriever.getExecutionBlock_workaround(bnOrId); ProgramResult res; if (blockResult.getFinalState() != null) { res = callConstant_workar... | EthModule implements EthModuleWallet, EthModuleTransaction { public String call(Web3.CallArguments args, String bnOrId) { String s = null; try { BlockResult blockResult = executionBlockRetriever.getExecutionBlock_workaround(bnOrId); ProgramResult res; if (blockResult.getFinalState() != null) { res = callConstant_workar... | EthModule implements EthModuleWallet, EthModuleTransaction { public String call(Web3.CallArguments args, String bnOrId) { String s = null; try { BlockResult blockResult = executionBlockRetriever.getExecutionBlock_workaround(bnOrId); ProgramResult res; if (blockResult.getFinalState() != null) { res = callConstant_workar... |
@Test public void callFromAddressInWallet() throws Exception { World world = new World(); Account acc1 = new AccountBuilder(world).name("notDefault").balance(Coin.valueOf(10000000)).build(); Block genesis = world.getBlockByName("g00"); Transaction tx = new TransactionBuilder() .sender(acc1) .gasLimit(BigInteger.valueOf... | @Override public String personal_newAccountWithSeed(String seed) { return personalModule.newAccountWithSeed(seed); } | Web3Impl implements Web3 { @Override public String personal_newAccountWithSeed(String seed) { return personalModule.newAccountWithSeed(seed); } } | Web3Impl implements Web3 { @Override public String personal_newAccountWithSeed(String seed) { return personalModule.newAccountWithSeed(seed); } protected Web3Impl(
Ethereum eth,
Blockchain blockchain,
BlockStore blockStore,
ReceiptStore receiptStore,
RskSyste... | Web3Impl implements Web3 { @Override public String personal_newAccountWithSeed(String seed) { return personalModule.newAccountWithSeed(seed); } protected Web3Impl(
Ethereum eth,
Blockchain blockchain,
BlockStore blockStore,
ReceiptStore receiptStore,
RskSyste... | Web3Impl implements Web3 { @Override public String personal_newAccountWithSeed(String seed) { return personalModule.newAccountWithSeed(seed); } protected Web3Impl(
Ethereum eth,
Blockchain blockchain,
BlockStore blockStore,
ReceiptStore receiptStore,
RskSyste... |
@Test public void getCode() { byte[] expectedCode = new byte[] {1, 2, 3}; TransactionPool mockTransactionPool = mock(TransactionPool.class); PendingState mockPendingState = mock(PendingState.class); doReturn(expectedCode).when(mockPendingState).getCode(any(RskAddress.class)); doReturn(mockPendingState).when(mockTransac... | public String getCode(String address, String blockId) { if (blockId == null) { throw new NullPointerException(); } String s = null; try { RskAddress addr = new RskAddress(address); AccountInformationProvider accountInformationProvider = getAccountInformationProvider(blockId); if(accountInformationProvider != null) { by... | EthModule implements EthModuleWallet, EthModuleTransaction { public String getCode(String address, String blockId) { if (blockId == null) { throw new NullPointerException(); } String s = null; try { RskAddress addr = new RskAddress(address); AccountInformationProvider accountInformationProvider = getAccountInformationP... | EthModule implements EthModuleWallet, EthModuleTransaction { public String getCode(String address, String blockId) { if (blockId == null) { throw new NullPointerException(); } String s = null; try { RskAddress addr = new RskAddress(address); AccountInformationProvider accountInformationProvider = getAccountInformationP... | EthModule implements EthModuleWallet, EthModuleTransaction { public String getCode(String address, String blockId) { if (blockId == null) { throw new NullPointerException(); } String s = null; try { RskAddress addr = new RskAddress(address); AccountInformationProvider accountInformationProvider = getAccountInformationP... | EthModule implements EthModuleWallet, EthModuleTransaction { public String getCode(String address, String blockId) { if (blockId == null) { throw new NullPointerException(); } String s = null; try { RskAddress addr = new RskAddress(address); AccountInformationProvider accountInformationProvider = getAccountInformationP... |
@Test public void chainId() { EthModule eth = new EthModule( mock(BridgeConstants.class), (byte) 33, mock(Blockchain.class), mock(TransactionPool.class), mock(ReversibleTransactionExecutor.class), mock(ExecutionBlockRetriever.class), mock(RepositoryLocator.class), mock(EthModuleWallet.class), mock(EthModuleTransaction.... | public String chainId() { return TypeConverter.toJsonHex(new byte[] { chainId }); } | EthModule implements EthModuleWallet, EthModuleTransaction { public String chainId() { return TypeConverter.toJsonHex(new byte[] { chainId }); } } | EthModule implements EthModuleWallet, EthModuleTransaction { public String chainId() { return TypeConverter.toJsonHex(new byte[] { chainId }); } EthModule(
BridgeConstants bridgeConstants,
byte chainId,
Blockchain blockchain,
TransactionPool transactionPool,
R... | EthModule implements EthModuleWallet, EthModuleTransaction { public String chainId() { return TypeConverter.toJsonHex(new byte[] { chainId }); } EthModule(
BridgeConstants bridgeConstants,
byte chainId,
Blockchain blockchain,
TransactionPool transactionPool,
R... | EthModule implements EthModuleWallet, EthModuleTransaction { public String chainId() { return TypeConverter.toJsonHex(new byte[] { chainId }); } EthModule(
BridgeConstants bridgeConstants,
byte chainId,
Blockchain blockchain,
TransactionPool transactionPool,
R... |
@Test public void deserializeUnsubscribe() throws IOException { String message = "{\"jsonrpc\":\"2.0\",\"id\":100,\"method\":\"eth_unsubscribe\",\"params\":[\"0x0204\"]}"; RskJsonRpcRequest request = serializer.deserializeRequest( new ByteArrayInputStream(message.getBytes(StandardCharsets.UTF_8)) ); assertThat(request,... | @JsonInclude(JsonInclude.Include.NON_NULL) public EthUnsubscribeParams getParams() { return params; } | EthUnsubscribeRequest extends RskJsonRpcRequest { @JsonInclude(JsonInclude.Include.NON_NULL) public EthUnsubscribeParams getParams() { return params; } } | EthUnsubscribeRequest extends RskJsonRpcRequest { @JsonInclude(JsonInclude.Include.NON_NULL) public EthUnsubscribeParams getParams() { return params; } @JsonCreator EthUnsubscribeRequest(
@JsonProperty("jsonrpc") JsonRpcVersion version,
@JsonProperty("method") RskJsonRpcMethod method,
... | EthUnsubscribeRequest extends RskJsonRpcRequest { @JsonInclude(JsonInclude.Include.NON_NULL) public EthUnsubscribeParams getParams() { return params; } @JsonCreator EthUnsubscribeRequest(
@JsonProperty("jsonrpc") JsonRpcVersion version,
@JsonProperty("method") RskJsonRpcMethod method,
... | EthUnsubscribeRequest extends RskJsonRpcRequest { @JsonInclude(JsonInclude.Include.NON_NULL) public EthUnsubscribeParams getParams() { return params; } @JsonCreator EthUnsubscribeRequest(
@JsonProperty("jsonrpc") JsonRpcVersion version,
@JsonProperty("method") RskJsonRpcMethod method,
... |
@Test public void getLogIndex() { assertThat(logsNotification.getLogIndex(), is(QUANTITY_JSON_HEX)); } | public String getLogIndex() { if (lazyLogIndex == null) { lazyLogIndex = toQuantityJsonHex(logInfoIndex); } return lazyLogIndex; } | LogsNotification implements EthSubscriptionNotificationDTO { public String getLogIndex() { if (lazyLogIndex == null) { lazyLogIndex = toQuantityJsonHex(logInfoIndex); } return lazyLogIndex; } } | LogsNotification implements EthSubscriptionNotificationDTO { public String getLogIndex() { if (lazyLogIndex == null) { lazyLogIndex = toQuantityJsonHex(logInfoIndex); } return lazyLogIndex; } LogsNotification(LogInfo logInfo, Block b, int txIndex, Transaction tx, int logIdx, boolean r); } | LogsNotification implements EthSubscriptionNotificationDTO { public String getLogIndex() { if (lazyLogIndex == null) { lazyLogIndex = toQuantityJsonHex(logInfoIndex); } return lazyLogIndex; } LogsNotification(LogInfo logInfo, Block b, int txIndex, Transaction tx, int logIdx, boolean r); String getLogIndex(); String get... | LogsNotification implements EthSubscriptionNotificationDTO { public String getLogIndex() { if (lazyLogIndex == null) { lazyLogIndex = toQuantityJsonHex(logInfoIndex); } return lazyLogIndex; } LogsNotification(LogInfo logInfo, Block b, int txIndex, Transaction tx, int logIdx, boolean r); String getLogIndex(); String get... |
@Test public void getBlockNumber() { doReturn(42L).when(block).getNumber(); assertThat(logsNotification.getBlockNumber(), is(QUANTITY_JSON_HEX)); } | public String getBlockNumber() { if (lazyBlockNumber == null) { lazyBlockNumber = toQuantityJsonHex(block.getNumber()); } return lazyBlockNumber; } | LogsNotification implements EthSubscriptionNotificationDTO { public String getBlockNumber() { if (lazyBlockNumber == null) { lazyBlockNumber = toQuantityJsonHex(block.getNumber()); } return lazyBlockNumber; } } | LogsNotification implements EthSubscriptionNotificationDTO { public String getBlockNumber() { if (lazyBlockNumber == null) { lazyBlockNumber = toQuantityJsonHex(block.getNumber()); } return lazyBlockNumber; } LogsNotification(LogInfo logInfo, Block b, int txIndex, Transaction tx, int logIdx, boolean r); } | LogsNotification implements EthSubscriptionNotificationDTO { public String getBlockNumber() { if (lazyBlockNumber == null) { lazyBlockNumber = toQuantityJsonHex(block.getNumber()); } return lazyBlockNumber; } LogsNotification(LogInfo logInfo, Block b, int txIndex, Transaction tx, int logIdx, boolean r); String getLogIn... | LogsNotification implements EthSubscriptionNotificationDTO { public String getBlockNumber() { if (lazyBlockNumber == null) { lazyBlockNumber = toQuantityJsonHex(block.getNumber()); } return lazyBlockNumber; } LogsNotification(LogInfo logInfo, Block b, int txIndex, Transaction tx, int logIdx, boolean r); String getLogIn... |
@Test public void getBlockHash() { Keccak256 blockHash = TestUtils.randomHash(); doReturn(blockHash).when(block).getHash(); doCallRealMethod().when(block).getHashJsonString(); assertThat(logsNotification.getBlockHash(), is(toUnformattedJsonHex(blockHash.getBytes()))); } | public String getBlockHash() { if (lazyBlockHash == null) { lazyBlockHash = block.getHashJsonString(); } return lazyBlockHash; } | LogsNotification implements EthSubscriptionNotificationDTO { public String getBlockHash() { if (lazyBlockHash == null) { lazyBlockHash = block.getHashJsonString(); } return lazyBlockHash; } } | LogsNotification implements EthSubscriptionNotificationDTO { public String getBlockHash() { if (lazyBlockHash == null) { lazyBlockHash = block.getHashJsonString(); } return lazyBlockHash; } LogsNotification(LogInfo logInfo, Block b, int txIndex, Transaction tx, int logIdx, boolean r); } | LogsNotification implements EthSubscriptionNotificationDTO { public String getBlockHash() { if (lazyBlockHash == null) { lazyBlockHash = block.getHashJsonString(); } return lazyBlockHash; } LogsNotification(LogInfo logInfo, Block b, int txIndex, Transaction tx, int logIdx, boolean r); String getLogIndex(); String getBl... | LogsNotification implements EthSubscriptionNotificationDTO { public String getBlockHash() { if (lazyBlockHash == null) { lazyBlockHash = block.getHashJsonString(); } return lazyBlockHash; } LogsNotification(LogInfo logInfo, Block b, int txIndex, Transaction tx, int logIdx, boolean r); String getLogIndex(); String getBl... |
@Test public void getTransactionHash() { Keccak256 transactionHash = TestUtils.randomHash(); doReturn(transactionHash).when(transaction).getHash(); assertThat(logsNotification.getTransactionHash(), is(toUnformattedJsonHex(transactionHash.getBytes()))); } | public String getTransactionHash() { if (lazyTransactionHash == null) { lazyTransactionHash = transaction.getHash().toJsonString(); } return lazyTransactionHash; } | LogsNotification implements EthSubscriptionNotificationDTO { public String getTransactionHash() { if (lazyTransactionHash == null) { lazyTransactionHash = transaction.getHash().toJsonString(); } return lazyTransactionHash; } } | LogsNotification implements EthSubscriptionNotificationDTO { public String getTransactionHash() { if (lazyTransactionHash == null) { lazyTransactionHash = transaction.getHash().toJsonString(); } return lazyTransactionHash; } LogsNotification(LogInfo logInfo, Block b, int txIndex, Transaction tx, int logIdx, boolean r);... | LogsNotification implements EthSubscriptionNotificationDTO { public String getTransactionHash() { if (lazyTransactionHash == null) { lazyTransactionHash = transaction.getHash().toJsonString(); } return lazyTransactionHash; } LogsNotification(LogInfo logInfo, Block b, int txIndex, Transaction tx, int logIdx, boolean r);... | LogsNotification implements EthSubscriptionNotificationDTO { public String getTransactionHash() { if (lazyTransactionHash == null) { lazyTransactionHash = transaction.getHash().toJsonString(); } return lazyTransactionHash; } LogsNotification(LogInfo logInfo, Block b, int txIndex, Transaction tx, int logIdx, boolean r);... |
@Test public void getTransactionIndex() { assertThat(logsNotification.getTransactionIndex(), is(QUANTITY_JSON_HEX)); } | public String getTransactionIndex() { if (lazyTransactionIndex == null) { lazyTransactionIndex = toQuantityJsonHex(transactionIndex); } return lazyTransactionIndex; } | LogsNotification implements EthSubscriptionNotificationDTO { public String getTransactionIndex() { if (lazyTransactionIndex == null) { lazyTransactionIndex = toQuantityJsonHex(transactionIndex); } return lazyTransactionIndex; } } | LogsNotification implements EthSubscriptionNotificationDTO { public String getTransactionIndex() { if (lazyTransactionIndex == null) { lazyTransactionIndex = toQuantityJsonHex(transactionIndex); } return lazyTransactionIndex; } LogsNotification(LogInfo logInfo, Block b, int txIndex, Transaction tx, int logIdx, boolean ... | LogsNotification implements EthSubscriptionNotificationDTO { public String getTransactionIndex() { if (lazyTransactionIndex == null) { lazyTransactionIndex = toQuantityJsonHex(transactionIndex); } return lazyTransactionIndex; } LogsNotification(LogInfo logInfo, Block b, int txIndex, Transaction tx, int logIdx, boolean ... | LogsNotification implements EthSubscriptionNotificationDTO { public String getTransactionIndex() { if (lazyTransactionIndex == null) { lazyTransactionIndex = toQuantityJsonHex(transactionIndex); } return lazyTransactionIndex; } LogsNotification(LogInfo logInfo, Block b, int txIndex, Transaction tx, int logIdx, boolean ... |
@Test public void getAddress() { byte[] logSender = TestUtils.randomAddress().getBytes(); doReturn(logSender).when(logInfo).getAddress(); assertThat(logsNotification.getAddress(), is(toJsonHex(logSender))); } | public String getAddress() { if (lazyAddress == null) { lazyAddress = toJsonHex(logInfo.getAddress()); } return lazyAddress; } | LogsNotification implements EthSubscriptionNotificationDTO { public String getAddress() { if (lazyAddress == null) { lazyAddress = toJsonHex(logInfo.getAddress()); } return lazyAddress; } } | LogsNotification implements EthSubscriptionNotificationDTO { public String getAddress() { if (lazyAddress == null) { lazyAddress = toJsonHex(logInfo.getAddress()); } return lazyAddress; } LogsNotification(LogInfo logInfo, Block b, int txIndex, Transaction tx, int logIdx, boolean r); } | LogsNotification implements EthSubscriptionNotificationDTO { public String getAddress() { if (lazyAddress == null) { lazyAddress = toJsonHex(logInfo.getAddress()); } return lazyAddress; } LogsNotification(LogInfo logInfo, Block b, int txIndex, Transaction tx, int logIdx, boolean r); String getLogIndex(); String getBloc... | LogsNotification implements EthSubscriptionNotificationDTO { public String getAddress() { if (lazyAddress == null) { lazyAddress = toJsonHex(logInfo.getAddress()); } return lazyAddress; } LogsNotification(LogInfo logInfo, Block b, int txIndex, Transaction tx, int logIdx, boolean r); String getLogIndex(); String getBloc... |
@Test public void getData() { byte[] logData = TestUtils.randomBytes(random.nextInt(1024)); doReturn(logData).when(logInfo).getData(); assertThat(logsNotification.getData(), is(toJsonHex(logData))); } | public String getData() { if (lazyData == null) { lazyData = toJsonHex(logInfo.getData()); } return lazyData; } | LogsNotification implements EthSubscriptionNotificationDTO { public String getData() { if (lazyData == null) { lazyData = toJsonHex(logInfo.getData()); } return lazyData; } } | LogsNotification implements EthSubscriptionNotificationDTO { public String getData() { if (lazyData == null) { lazyData = toJsonHex(logInfo.getData()); } return lazyData; } LogsNotification(LogInfo logInfo, Block b, int txIndex, Transaction tx, int logIdx, boolean r); } | LogsNotification implements EthSubscriptionNotificationDTO { public String getData() { if (lazyData == null) { lazyData = toJsonHex(logInfo.getData()); } return lazyData; } LogsNotification(LogInfo logInfo, Block b, int txIndex, Transaction tx, int logIdx, boolean r); String getLogIndex(); String getBlockNumber(); Stri... | LogsNotification implements EthSubscriptionNotificationDTO { public String getData() { if (lazyData == null) { lazyData = toJsonHex(logInfo.getData()); } return lazyData; } LogsNotification(LogInfo logInfo, Block b, int txIndex, Transaction tx, int logIdx, boolean r); String getLogIndex(); String getBlockNumber(); Stri... |
@Test public void net_listening() { World world = new World(); SimpleEthereum eth = new SimpleEthereum(world.getBlockChain()); SimplePeerServer peerServer = new SimplePeerServer(); Web3Impl web3 = createWeb3(eth, peerServer); assertTrue("Node is not listening", !web3.net_listening()); peerServer.isListening = true; ass... | @Override public boolean net_listening() { Boolean s = null; try { return s = peerServer.isListening(); } finally { if (logger.isDebugEnabled()) { logger.debug("net_listening(): {}", s); } } } | Web3Impl implements Web3 { @Override public boolean net_listening() { Boolean s = null; try { return s = peerServer.isListening(); } finally { if (logger.isDebugEnabled()) { logger.debug("net_listening(): {}", s); } } } } | Web3Impl implements Web3 { @Override public boolean net_listening() { Boolean s = null; try { return s = peerServer.isListening(); } finally { if (logger.isDebugEnabled()) { logger.debug("net_listening(): {}", s); } } } protected Web3Impl(
Ethereum eth,
Blockchain blockchain,
BlockS... | Web3Impl implements Web3 { @Override public boolean net_listening() { Boolean s = null; try { return s = peerServer.isListening(); } finally { if (logger.isDebugEnabled()) { logger.debug("net_listening(): {}", s); } } } protected Web3Impl(
Ethereum eth,
Blockchain blockchain,
BlockS... | Web3Impl implements Web3 { @Override public boolean net_listening() { Boolean s = null; try { return s = peerServer.isListening(); } finally { if (logger.isDebugEnabled()) { logger.debug("net_listening(): {}", s); } } } protected Web3Impl(
Ethereum eth,
Blockchain blockchain,
BlockS... |
@Test public void getTopics() { List<DataWord> logTopics = IntStream.range(0, random.nextInt(1024)).mapToObj(i -> TestUtils.randomDataWord()).collect(Collectors.toList()); doReturn(logTopics).when(logInfo).getTopics(); for (int i = 0; i < logTopics.size(); i++) { assertThat(logsNotification.getTopics().get(i), is(toJso... | public List<String> getTopics() { if (lazyTopics == null) { lazyTopics = logInfo.getTopics().stream() .map(t -> toJsonHex(t.getData())) .collect(Collectors.toList()); } return Collections.unmodifiableList(lazyTopics); } | LogsNotification implements EthSubscriptionNotificationDTO { public List<String> getTopics() { if (lazyTopics == null) { lazyTopics = logInfo.getTopics().stream() .map(t -> toJsonHex(t.getData())) .collect(Collectors.toList()); } return Collections.unmodifiableList(lazyTopics); } } | LogsNotification implements EthSubscriptionNotificationDTO { public List<String> getTopics() { if (lazyTopics == null) { lazyTopics = logInfo.getTopics().stream() .map(t -> toJsonHex(t.getData())) .collect(Collectors.toList()); } return Collections.unmodifiableList(lazyTopics); } LogsNotification(LogInfo logInfo, Block... | LogsNotification implements EthSubscriptionNotificationDTO { public List<String> getTopics() { if (lazyTopics == null) { lazyTopics = logInfo.getTopics().stream() .map(t -> toJsonHex(t.getData())) .collect(Collectors.toList()); } return Collections.unmodifiableList(lazyTopics); } LogsNotification(LogInfo logInfo, Block... | LogsNotification implements EthSubscriptionNotificationDTO { public List<String> getTopics() { if (lazyTopics == null) { lazyTopics = logInfo.getTopics().stream() .map(t -> toJsonHex(t.getData())) .collect(Collectors.toList()); } return Collections.unmodifiableList(lazyTopics); } LogsNotification(LogInfo logInfo, Block... |
@Test public void onBestBlockEventTriggersMessageToChannel() throws JsonProcessingException { SubscriptionId subscriptionId = mock(SubscriptionId.class); Channel channel = mock(Channel.class); EthSubscribeLogsParams params = mock(EthSubscribeLogsParams.class); emitter.subscribe(subscriptionId, channel, params); when(se... | public void subscribe(SubscriptionId subscriptionId, Channel channel, EthSubscribeLogsParams params) { subscriptions.put(subscriptionId, new Subscription(channel, params)); } | LogsNotificationEmitter { public void subscribe(SubscriptionId subscriptionId, Channel channel, EthSubscribeLogsParams params) { subscriptions.put(subscriptionId, new Subscription(channel, params)); } } | LogsNotificationEmitter { public void subscribe(SubscriptionId subscriptionId, Channel channel, EthSubscribeLogsParams params) { subscriptions.put(subscriptionId, new Subscription(channel, params)); } LogsNotificationEmitter(
Ethereum ethereum,
JsonRpcSerializer jsonRpcSerializer,
Re... | LogsNotificationEmitter { public void subscribe(SubscriptionId subscriptionId, Channel channel, EthSubscribeLogsParams params) { subscriptions.put(subscriptionId, new Subscription(channel, params)); } LogsNotificationEmitter(
Ethereum ethereum,
JsonRpcSerializer jsonRpcSerializer,
Re... | LogsNotificationEmitter { public void subscribe(SubscriptionId subscriptionId, Channel channel, EthSubscribeLogsParams params) { subscriptions.put(subscriptionId, new Subscription(channel, params)); } LogsNotificationEmitter(
Ethereum ethereum,
JsonRpcSerializer jsonRpcSerializer,
Re... |
@Test public void onBestBlockEventTriggersOneMessageToChannelPerLogInfoAndSubscription() throws JsonProcessingException { SubscriptionId subscriptionId1 = mock(SubscriptionId.class); SubscriptionId subscriptionId2 = mock(SubscriptionId.class); Channel channel1 = mock(Channel.class); Channel channel2 = mock(Channel.clas... | public void subscribe(SubscriptionId subscriptionId, Channel channel, EthSubscribeLogsParams params) { subscriptions.put(subscriptionId, new Subscription(channel, params)); } | LogsNotificationEmitter { public void subscribe(SubscriptionId subscriptionId, Channel channel, EthSubscribeLogsParams params) { subscriptions.put(subscriptionId, new Subscription(channel, params)); } } | LogsNotificationEmitter { public void subscribe(SubscriptionId subscriptionId, Channel channel, EthSubscribeLogsParams params) { subscriptions.put(subscriptionId, new Subscription(channel, params)); } LogsNotificationEmitter(
Ethereum ethereum,
JsonRpcSerializer jsonRpcSerializer,
Re... | LogsNotificationEmitter { public void subscribe(SubscriptionId subscriptionId, Channel channel, EthSubscribeLogsParams params) { subscriptions.put(subscriptionId, new Subscription(channel, params)); } LogsNotificationEmitter(
Ethereum ethereum,
JsonRpcSerializer jsonRpcSerializer,
Re... | LogsNotificationEmitter { public void subscribe(SubscriptionId subscriptionId, Channel channel, EthSubscribeLogsParams params) { subscriptions.put(subscriptionId, new Subscription(channel, params)); } LogsNotificationEmitter(
Ethereum ethereum,
JsonRpcSerializer jsonRpcSerializer,
Re... |
@Test public void filterEmittedLog() throws JsonProcessingException { SubscriptionId subscriptionId = mock(SubscriptionId.class); Channel channel = mock(Channel.class); EthSubscribeLogsParams params = mock(EthSubscribeLogsParams.class); RskAddress logSender = TestUtils.randomAddress(); when(params.getAddresses()).thenR... | public void subscribe(SubscriptionId subscriptionId, Channel channel, EthSubscribeLogsParams params) { subscriptions.put(subscriptionId, new Subscription(channel, params)); } | LogsNotificationEmitter { public void subscribe(SubscriptionId subscriptionId, Channel channel, EthSubscribeLogsParams params) { subscriptions.put(subscriptionId, new Subscription(channel, params)); } } | LogsNotificationEmitter { public void subscribe(SubscriptionId subscriptionId, Channel channel, EthSubscribeLogsParams params) { subscriptions.put(subscriptionId, new Subscription(channel, params)); } LogsNotificationEmitter(
Ethereum ethereum,
JsonRpcSerializer jsonRpcSerializer,
Re... | LogsNotificationEmitter { public void subscribe(SubscriptionId subscriptionId, Channel channel, EthSubscribeLogsParams params) { subscriptions.put(subscriptionId, new Subscription(channel, params)); } LogsNotificationEmitter(
Ethereum ethereum,
JsonRpcSerializer jsonRpcSerializer,
Re... | LogsNotificationEmitter { public void subscribe(SubscriptionId subscriptionId, Channel channel, EthSubscribeLogsParams params) { subscriptions.put(subscriptionId, new Subscription(channel, params)); } LogsNotificationEmitter(
Ethereum ethereum,
JsonRpcSerializer jsonRpcSerializer,
Re... |
@Test public void emitsNewAndRemovedLogs() throws JsonProcessingException { SubscriptionId subscriptionId = mock(SubscriptionId.class); Channel channel = mock(Channel.class); EthSubscribeLogsParams params = mock(EthSubscribeLogsParams.class); emitter.subscribe(subscriptionId, channel, params); byte[] log1Data = {0x1}; ... | public void subscribe(SubscriptionId subscriptionId, Channel channel, EthSubscribeLogsParams params) { subscriptions.put(subscriptionId, new Subscription(channel, params)); } | LogsNotificationEmitter { public void subscribe(SubscriptionId subscriptionId, Channel channel, EthSubscribeLogsParams params) { subscriptions.put(subscriptionId, new Subscription(channel, params)); } } | LogsNotificationEmitter { public void subscribe(SubscriptionId subscriptionId, Channel channel, EthSubscribeLogsParams params) { subscriptions.put(subscriptionId, new Subscription(channel, params)); } LogsNotificationEmitter(
Ethereum ethereum,
JsonRpcSerializer jsonRpcSerializer,
Re... | LogsNotificationEmitter { public void subscribe(SubscriptionId subscriptionId, Channel channel, EthSubscribeLogsParams params) { subscriptions.put(subscriptionId, new Subscription(channel, params)); } LogsNotificationEmitter(
Ethereum ethereum,
JsonRpcSerializer jsonRpcSerializer,
Re... | LogsNotificationEmitter { public void subscribe(SubscriptionId subscriptionId, Channel channel, EthSubscribeLogsParams params) { subscriptions.put(subscriptionId, new Subscription(channel, params)); } LogsNotificationEmitter(
Ethereum ethereum,
JsonRpcSerializer jsonRpcSerializer,
Re... |
@Test public void ethereumOnBlockEventTriggersMessageToChannel() throws JsonProcessingException { SubscriptionId subscriptionId = mock(SubscriptionId.class); Channel channel = mock(Channel.class); emitter.subscribe(subscriptionId, channel); when(serializer.serializeMessage(any())) .thenReturn("serialized"); listener.on... | public void subscribe(SubscriptionId subscriptionId, Channel channel) { subscriptions.put(subscriptionId, channel); } | BlockHeaderNotificationEmitter { public void subscribe(SubscriptionId subscriptionId, Channel channel) { subscriptions.put(subscriptionId, channel); } } | BlockHeaderNotificationEmitter { public void subscribe(SubscriptionId subscriptionId, Channel channel) { subscriptions.put(subscriptionId, channel); } BlockHeaderNotificationEmitter(Ethereum ethereum, JsonRpcSerializer jsonRpcSerializer); } | BlockHeaderNotificationEmitter { public void subscribe(SubscriptionId subscriptionId, Channel channel) { subscriptions.put(subscriptionId, channel); } BlockHeaderNotificationEmitter(Ethereum ethereum, JsonRpcSerializer jsonRpcSerializer); void subscribe(SubscriptionId subscriptionId, Channel channel); boolean unsubscri... | BlockHeaderNotificationEmitter { public void subscribe(SubscriptionId subscriptionId, Channel channel) { subscriptions.put(subscriptionId, channel); } BlockHeaderNotificationEmitter(Ethereum ethereum, JsonRpcSerializer jsonRpcSerializer); void subscribe(SubscriptionId subscriptionId, Channel channel); boolean unsubscri... |
@Test public void getTopAddress() { TraceAddress address = new TraceAddress(); Assert.assertArrayEquals(new int[0], address.toAddress()); } | @JsonValue public int[] toAddress() { if (this.parent == null) { return EMPTY_ADDRESS; } int[] parentAddress = this.parent.toAddress(); int[] address = Arrays.copyOf(parentAddress, parentAddress.length + 1); address[address.length - 1] = this.index; return address; } | TraceAddress { @JsonValue public int[] toAddress() { if (this.parent == null) { return EMPTY_ADDRESS; } int[] parentAddress = this.parent.toAddress(); int[] address = Arrays.copyOf(parentAddress, parentAddress.length + 1); address[address.length - 1] = this.index; return address; } } | TraceAddress { @JsonValue public int[] toAddress() { if (this.parent == null) { return EMPTY_ADDRESS; } int[] parentAddress = this.parent.toAddress(); int[] address = Arrays.copyOf(parentAddress, parentAddress.length + 1); address[address.length - 1] = this.index; return address; } TraceAddress(); TraceAddress(TraceAd... | TraceAddress { @JsonValue public int[] toAddress() { if (this.parent == null) { return EMPTY_ADDRESS; } int[] parentAddress = this.parent.toAddress(); int[] address = Arrays.copyOf(parentAddress, parentAddress.length + 1); address[address.length - 1] = this.index; return address; } TraceAddress(); TraceAddress(TraceAd... | TraceAddress { @JsonValue public int[] toAddress() { if (this.parent == null) { return EMPTY_ADDRESS; } int[] parentAddress = this.parent.toAddress(); int[] address = Arrays.copyOf(parentAddress, parentAddress.length + 1); address[address.length - 1] = this.index; return address; } TraceAddress(); TraceAddress(TraceAd... |
@Test public void getChildAddress() { TraceAddress parent = new TraceAddress(); TraceAddress address = new TraceAddress(parent, 1); Assert.assertArrayEquals(new int[] { 1 }, address.toAddress()); } | @JsonValue public int[] toAddress() { if (this.parent == null) { return EMPTY_ADDRESS; } int[] parentAddress = this.parent.toAddress(); int[] address = Arrays.copyOf(parentAddress, parentAddress.length + 1); address[address.length - 1] = this.index; return address; } | TraceAddress { @JsonValue public int[] toAddress() { if (this.parent == null) { return EMPTY_ADDRESS; } int[] parentAddress = this.parent.toAddress(); int[] address = Arrays.copyOf(parentAddress, parentAddress.length + 1); address[address.length - 1] = this.index; return address; } } | TraceAddress { @JsonValue public int[] toAddress() { if (this.parent == null) { return EMPTY_ADDRESS; } int[] parentAddress = this.parent.toAddress(); int[] address = Arrays.copyOf(parentAddress, parentAddress.length + 1); address[address.length - 1] = this.index; return address; } TraceAddress(); TraceAddress(TraceAd... | TraceAddress { @JsonValue public int[] toAddress() { if (this.parent == null) { return EMPTY_ADDRESS; } int[] parentAddress = this.parent.toAddress(); int[] address = Arrays.copyOf(parentAddress, parentAddress.length + 1); address[address.length - 1] = this.index; return address; } TraceAddress(); TraceAddress(TraceAd... | TraceAddress { @JsonValue public int[] toAddress() { if (this.parent == null) { return EMPTY_ADDRESS; } int[] parentAddress = this.parent.toAddress(); int[] address = Arrays.copyOf(parentAddress, parentAddress.length + 1); address[address.length - 1] = this.index; return address; } TraceAddress(); TraceAddress(TraceAd... |
@Test public void getGrandChildAddress() { TraceAddress grandparent = new TraceAddress(); TraceAddress parent = new TraceAddress(grandparent, 1); TraceAddress address = new TraceAddress(parent, 2); Assert.assertArrayEquals(new int[] { 1, 2 }, address.toAddress()); } | @JsonValue public int[] toAddress() { if (this.parent == null) { return EMPTY_ADDRESS; } int[] parentAddress = this.parent.toAddress(); int[] address = Arrays.copyOf(parentAddress, parentAddress.length + 1); address[address.length - 1] = this.index; return address; } | TraceAddress { @JsonValue public int[] toAddress() { if (this.parent == null) { return EMPTY_ADDRESS; } int[] parentAddress = this.parent.toAddress(); int[] address = Arrays.copyOf(parentAddress, parentAddress.length + 1); address[address.length - 1] = this.index; return address; } } | TraceAddress { @JsonValue public int[] toAddress() { if (this.parent == null) { return EMPTY_ADDRESS; } int[] parentAddress = this.parent.toAddress(); int[] address = Arrays.copyOf(parentAddress, parentAddress.length + 1); address[address.length - 1] = this.index; return address; } TraceAddress(); TraceAddress(TraceAd... | TraceAddress { @JsonValue public int[] toAddress() { if (this.parent == null) { return EMPTY_ADDRESS; } int[] parentAddress = this.parent.toAddress(); int[] address = Arrays.copyOf(parentAddress, parentAddress.length + 1); address[address.length - 1] = this.index; return address; } TraceAddress(); TraceAddress(TraceAd... | TraceAddress { @JsonValue public int[] toAddress() { if (this.parent == null) { return EMPTY_ADDRESS; } int[] parentAddress = this.parent.toAddress(); int[] address = Arrays.copyOf(parentAddress, parentAddress.length + 1); address[address.length - 1] = this.index; return address; } TraceAddress(); TraceAddress(TraceAd... |
@Test public void getActionFromInvokeData() { DataWord address = DataWord.valueOf(1); DataWord origin = DataWord.valueOf(2); DataWord caller = DataWord.valueOf(3); long gas = 1000000; DataWord callValue = DataWord.valueOf(100000); byte[] data = new byte[]{0x01, 0x02, 0x03, 0x04}; ProgramInvoke invoke = new ProgramInvok... | public static TraceAction toAction(TraceType traceType, InvokeData invoke, CallType callType, byte[] creationInput, String creationMethod, DataWord codeAddress) { String from; if (callType == CallType.DELEGATECALL) { from = new RskAddress(invoke.getOwnerAddress().getLast20Bytes()).toJsonString(); } else { from = new Rs... | TraceTransformer { public static TraceAction toAction(TraceType traceType, InvokeData invoke, CallType callType, byte[] creationInput, String creationMethod, DataWord codeAddress) { String from; if (callType == CallType.DELEGATECALL) { from = new RskAddress(invoke.getOwnerAddress().getLast20Bytes()).toJsonString(); } e... | TraceTransformer { public static TraceAction toAction(TraceType traceType, InvokeData invoke, CallType callType, byte[] creationInput, String creationMethod, DataWord codeAddress) { String from; if (callType == CallType.DELEGATECALL) { from = new RskAddress(invoke.getOwnerAddress().getLast20Bytes()).toJsonString(); } e... | TraceTransformer { public static TraceAction toAction(TraceType traceType, InvokeData invoke, CallType callType, byte[] creationInput, String creationMethod, DataWord codeAddress) { String from; if (callType == CallType.DELEGATECALL) { from = new RskAddress(invoke.getOwnerAddress().getLast20Bytes()).toJsonString(); } e... | TraceTransformer { public static TraceAction toAction(TraceType traceType, InvokeData invoke, CallType callType, byte[] creationInput, String creationMethod, DataWord codeAddress) { String from; if (callType == CallType.DELEGATECALL) { from = new RskAddress(invoke.getOwnerAddress().getLast20Bytes()).toJsonString(); } e... |
@Test public void eth_coinbase() { String originalCoinbase = "1dcc4de8dec75d7aab85b513f0a142fd40d49347"; MinerServer minerServerMock = mock(MinerServer.class); when(minerServerMock.getCoinbaseAddress()).thenReturn(new RskAddress(originalCoinbase)); Ethereum ethMock = Web3Mocks.getMockEthereum(); Blockchain blockchain =... | @Override public String eth_coinbase() { String s = null; try { s = minerServer.getCoinbaseAddress().toJsonString(); return s; } finally { if (logger.isDebugEnabled()) { logger.debug("eth_coinbase(): {}", s); } } } | Web3Impl implements Web3 { @Override public String eth_coinbase() { String s = null; try { s = minerServer.getCoinbaseAddress().toJsonString(); return s; } finally { if (logger.isDebugEnabled()) { logger.debug("eth_coinbase(): {}", s); } } } } | Web3Impl implements Web3 { @Override public String eth_coinbase() { String s = null; try { s = minerServer.getCoinbaseAddress().toJsonString(); return s; } finally { if (logger.isDebugEnabled()) { logger.debug("eth_coinbase(): {}", s); } } } protected Web3Impl(
Ethereum eth,
Blockchain blockcha... | Web3Impl implements Web3 { @Override public String eth_coinbase() { String s = null; try { s = minerServer.getCoinbaseAddress().toJsonString(); return s; } finally { if (logger.isDebugEnabled()) { logger.debug("eth_coinbase(): {}", s); } } } protected Web3Impl(
Ethereum eth,
Blockchain blockcha... | Web3Impl implements Web3 { @Override public String eth_coinbase() { String s = null; try { s = minerServer.getCoinbaseAddress().toJsonString(); return s; } finally { if (logger.isDebugEnabled()) { logger.debug("eth_coinbase(): {}", s); } } } protected Web3Impl(
Ethereum eth,
Blockchain blockcha... |
@Test public void getActionFromInvokeDataWithCreationData() { DataWord address = DataWord.valueOf(1); DataWord origin = DataWord.valueOf(2); DataWord caller = DataWord.valueOf(3); long gas = 1000000; DataWord callValue = DataWord.valueOf(100000); byte[] data = new byte[]{0x01, 0x02, 0x03, 0x04}; ProgramInvoke invoke = ... | public static TraceAction toAction(TraceType traceType, InvokeData invoke, CallType callType, byte[] creationInput, String creationMethod, DataWord codeAddress) { String from; if (callType == CallType.DELEGATECALL) { from = new RskAddress(invoke.getOwnerAddress().getLast20Bytes()).toJsonString(); } else { from = new Rs... | TraceTransformer { public static TraceAction toAction(TraceType traceType, InvokeData invoke, CallType callType, byte[] creationInput, String creationMethod, DataWord codeAddress) { String from; if (callType == CallType.DELEGATECALL) { from = new RskAddress(invoke.getOwnerAddress().getLast20Bytes()).toJsonString(); } e... | TraceTransformer { public static TraceAction toAction(TraceType traceType, InvokeData invoke, CallType callType, byte[] creationInput, String creationMethod, DataWord codeAddress) { String from; if (callType == CallType.DELEGATECALL) { from = new RskAddress(invoke.getOwnerAddress().getLast20Bytes()).toJsonString(); } e... | TraceTransformer { public static TraceAction toAction(TraceType traceType, InvokeData invoke, CallType callType, byte[] creationInput, String creationMethod, DataWord codeAddress) { String from; if (callType == CallType.DELEGATECALL) { from = new RskAddress(invoke.getOwnerAddress().getLast20Bytes()).toJsonString(); } e... | TraceTransformer { public static TraceAction toAction(TraceType traceType, InvokeData invoke, CallType callType, byte[] creationInput, String creationMethod, DataWord codeAddress) { String from; if (callType == CallType.DELEGATECALL) { from = new RskAddress(invoke.getOwnerAddress().getLast20Bytes()).toJsonString(); } e... |
@Test public void getActionFromInvokeDataWithCreationDataUsingCreationMethod() { DataWord address = DataWord.valueOf(1); DataWord origin = DataWord.valueOf(2); DataWord caller = DataWord.valueOf(3); long gas = 1000000; DataWord callValue = DataWord.valueOf(100000); byte[] data = new byte[]{0x01, 0x02, 0x03, 0x04}; Prog... | public static TraceAction toAction(TraceType traceType, InvokeData invoke, CallType callType, byte[] creationInput, String creationMethod, DataWord codeAddress) { String from; if (callType == CallType.DELEGATECALL) { from = new RskAddress(invoke.getOwnerAddress().getLast20Bytes()).toJsonString(); } else { from = new Rs... | TraceTransformer { public static TraceAction toAction(TraceType traceType, InvokeData invoke, CallType callType, byte[] creationInput, String creationMethod, DataWord codeAddress) { String from; if (callType == CallType.DELEGATECALL) { from = new RskAddress(invoke.getOwnerAddress().getLast20Bytes()).toJsonString(); } e... | TraceTransformer { public static TraceAction toAction(TraceType traceType, InvokeData invoke, CallType callType, byte[] creationInput, String creationMethod, DataWord codeAddress) { String from; if (callType == CallType.DELEGATECALL) { from = new RskAddress(invoke.getOwnerAddress().getLast20Bytes()).toJsonString(); } e... | TraceTransformer { public static TraceAction toAction(TraceType traceType, InvokeData invoke, CallType callType, byte[] creationInput, String creationMethod, DataWord codeAddress) { String from; if (callType == CallType.DELEGATECALL) { from = new RskAddress(invoke.getOwnerAddress().getLast20Bytes()).toJsonString(); } e... | TraceTransformer { public static TraceAction toAction(TraceType traceType, InvokeData invoke, CallType callType, byte[] creationInput, String creationMethod, DataWord codeAddress) { String from; if (callType == CallType.DELEGATECALL) { from = new RskAddress(invoke.getOwnerAddress().getLast20Bytes()).toJsonString(); } e... |
@Test public void retrieveUnknownTransactionAsNull() throws Exception { ReceiptStore receiptStore = new ReceiptStoreImpl(new HashMapDB()); World world = new World(receiptStore); TraceModuleImpl traceModule = new TraceModuleImpl(world.getBlockChain(), world.getBlockStore(), receiptStore, world.getBlockExecutor()); JsonN... | @Override public JsonNode traceTransaction(String transactionHash) throws Exception { logger.trace("trace_transaction({})", transactionHash); byte[] hash = stringHexToByteArray(transactionHash); TransactionInfo txInfo = this.receiptStore.getInMainChain(hash, this.blockStore); if (txInfo == null) { logger.trace("No tran... | TraceModuleImpl implements TraceModule { @Override public JsonNode traceTransaction(String transactionHash) throws Exception { logger.trace("trace_transaction({})", transactionHash); byte[] hash = stringHexToByteArray(transactionHash); TransactionInfo txInfo = this.receiptStore.getInMainChain(hash, this.blockStore); if... | TraceModuleImpl implements TraceModule { @Override public JsonNode traceTransaction(String transactionHash) throws Exception { logger.trace("trace_transaction({})", transactionHash); byte[] hash = stringHexToByteArray(transactionHash); TransactionInfo txInfo = this.receiptStore.getInMainChain(hash, this.blockStore); if... | TraceModuleImpl implements TraceModule { @Override public JsonNode traceTransaction(String transactionHash) throws Exception { logger.trace("trace_transaction({})", transactionHash); byte[] hash = stringHexToByteArray(transactionHash); TransactionInfo txInfo = this.receiptStore.getInMainChain(hash, this.blockStore); if... | TraceModuleImpl implements TraceModule { @Override public JsonNode traceTransaction(String transactionHash) throws Exception { logger.trace("trace_transaction({})", transactionHash); byte[] hash = stringHexToByteArray(transactionHash); TransactionInfo txInfo = this.receiptStore.getInMainChain(hash, this.blockStore); if... |
@Test public void retrieveUnknownBlockAsNull() throws Exception { ReceiptStore receiptStore = new ReceiptStoreImpl(new HashMapDB()); World world = new World(receiptStore); TraceModuleImpl traceModule = new TraceModuleImpl(world.getBlockChain(), world.getBlockStore(), receiptStore, world.getBlockExecutor()); JsonNode re... | @Override public JsonNode traceBlock(String blockArgument) throws Exception { logger.trace("trace_block({})", blockArgument); Block block = this.getByJsonArgument(blockArgument); if (block == null) { logger.trace("No block for {}", blockArgument); return null; } Block parent = this.blockchain.getBlockByHash(block.getPa... | TraceModuleImpl implements TraceModule { @Override public JsonNode traceBlock(String blockArgument) throws Exception { logger.trace("trace_block({})", blockArgument); Block block = this.getByJsonArgument(blockArgument); if (block == null) { logger.trace("No block for {}", blockArgument); return null; } Block parent = t... | TraceModuleImpl implements TraceModule { @Override public JsonNode traceBlock(String blockArgument) throws Exception { logger.trace("trace_block({})", blockArgument); Block block = this.getByJsonArgument(blockArgument); if (block == null) { logger.trace("No block for {}", blockArgument); return null; } Block parent = t... | TraceModuleImpl implements TraceModule { @Override public JsonNode traceBlock(String blockArgument) throws Exception { logger.trace("trace_block({})", blockArgument); Block block = this.getByJsonArgument(blockArgument); if (block == null) { logger.trace("No block for {}", blockArgument); return null; } Block parent = t... | TraceModuleImpl implements TraceModule { @Override public JsonNode traceBlock(String blockArgument) throws Exception { logger.trace("trace_block({})", blockArgument); Block block = this.getByJsonArgument(blockArgument); if (block == null) { logger.trace("No block for {}", blockArgument); return null; } Block parent = t... |
@Test public void retrieveSimpleContractCreationTrace() throws Exception { DslParser parser = DslParser.fromResource("dsl/contracts01.txt"); ReceiptStore receiptStore = new ReceiptStoreImpl(new HashMapDB()); World world = new World(receiptStore); WorldDslProcessor processor = new WorldDslProcessor(world); processor.pro... | @Override public JsonNode traceTransaction(String transactionHash) throws Exception { logger.trace("trace_transaction({})", transactionHash); byte[] hash = stringHexToByteArray(transactionHash); TransactionInfo txInfo = this.receiptStore.getInMainChain(hash, this.blockStore); if (txInfo == null) { logger.trace("No tran... | TraceModuleImpl implements TraceModule { @Override public JsonNode traceTransaction(String transactionHash) throws Exception { logger.trace("trace_transaction({})", transactionHash); byte[] hash = stringHexToByteArray(transactionHash); TransactionInfo txInfo = this.receiptStore.getInMainChain(hash, this.blockStore); if... | TraceModuleImpl implements TraceModule { @Override public JsonNode traceTransaction(String transactionHash) throws Exception { logger.trace("trace_transaction({})", transactionHash); byte[] hash = stringHexToByteArray(transactionHash); TransactionInfo txInfo = this.receiptStore.getInMainChain(hash, this.blockStore); if... | TraceModuleImpl implements TraceModule { @Override public JsonNode traceTransaction(String transactionHash) throws Exception { logger.trace("trace_transaction({})", transactionHash); byte[] hash = stringHexToByteArray(transactionHash); TransactionInfo txInfo = this.receiptStore.getInMainChain(hash, this.blockStore); if... | TraceModuleImpl implements TraceModule { @Override public JsonNode traceTransaction(String transactionHash) throws Exception { logger.trace("trace_transaction({})", transactionHash); byte[] hash = stringHexToByteArray(transactionHash); TransactionInfo txInfo = this.receiptStore.getInMainChain(hash, this.blockStore); if... |
@Test public void retrieveEmptyContractCreationTrace() throws Exception { DslParser parser = DslParser.fromResource("dsl/contracts09.txt"); ReceiptStore receiptStore = new ReceiptStoreImpl(new HashMapDB()); World world = new World(receiptStore); WorldDslProcessor processor = new WorldDslProcessor(world); processor.proc... | @Override public JsonNode traceTransaction(String transactionHash) throws Exception { logger.trace("trace_transaction({})", transactionHash); byte[] hash = stringHexToByteArray(transactionHash); TransactionInfo txInfo = this.receiptStore.getInMainChain(hash, this.blockStore); if (txInfo == null) { logger.trace("No tran... | TraceModuleImpl implements TraceModule { @Override public JsonNode traceTransaction(String transactionHash) throws Exception { logger.trace("trace_transaction({})", transactionHash); byte[] hash = stringHexToByteArray(transactionHash); TransactionInfo txInfo = this.receiptStore.getInMainChain(hash, this.blockStore); if... | TraceModuleImpl implements TraceModule { @Override public JsonNode traceTransaction(String transactionHash) throws Exception { logger.trace("trace_transaction({})", transactionHash); byte[] hash = stringHexToByteArray(transactionHash); TransactionInfo txInfo = this.receiptStore.getInMainChain(hash, this.blockStore); if... | TraceModuleImpl implements TraceModule { @Override public JsonNode traceTransaction(String transactionHash) throws Exception { logger.trace("trace_transaction({})", transactionHash); byte[] hash = stringHexToByteArray(transactionHash); TransactionInfo txInfo = this.receiptStore.getInMainChain(hash, this.blockStore); if... | TraceModuleImpl implements TraceModule { @Override public JsonNode traceTransaction(String transactionHash) throws Exception { logger.trace("trace_transaction({})", transactionHash); byte[] hash = stringHexToByteArray(transactionHash); TransactionInfo txInfo = this.receiptStore.getInMainChain(hash, this.blockStore); if... |
@Test public void retrieveSimpleContractInvocationTrace() throws Exception { DslParser parser = DslParser.fromResource("dsl/contracts02.txt"); ReceiptStore receiptStore = new ReceiptStoreImpl(new HashMapDB()); World world = new World(receiptStore); WorldDslProcessor processor = new WorldDslProcessor(world); processor.p... | @Override public JsonNode traceTransaction(String transactionHash) throws Exception { logger.trace("trace_transaction({})", transactionHash); byte[] hash = stringHexToByteArray(transactionHash); TransactionInfo txInfo = this.receiptStore.getInMainChain(hash, this.blockStore); if (txInfo == null) { logger.trace("No tran... | TraceModuleImpl implements TraceModule { @Override public JsonNode traceTransaction(String transactionHash) throws Exception { logger.trace("trace_transaction({})", transactionHash); byte[] hash = stringHexToByteArray(transactionHash); TransactionInfo txInfo = this.receiptStore.getInMainChain(hash, this.blockStore); if... | TraceModuleImpl implements TraceModule { @Override public JsonNode traceTransaction(String transactionHash) throws Exception { logger.trace("trace_transaction({})", transactionHash); byte[] hash = stringHexToByteArray(transactionHash); TransactionInfo txInfo = this.receiptStore.getInMainChain(hash, this.blockStore); if... | TraceModuleImpl implements TraceModule { @Override public JsonNode traceTransaction(String transactionHash) throws Exception { logger.trace("trace_transaction({})", transactionHash); byte[] hash = stringHexToByteArray(transactionHash); TransactionInfo txInfo = this.receiptStore.getInMainChain(hash, this.blockStore); if... | TraceModuleImpl implements TraceModule { @Override public JsonNode traceTransaction(String transactionHash) throws Exception { logger.trace("trace_transaction({})", transactionHash); byte[] hash = stringHexToByteArray(transactionHash); TransactionInfo txInfo = this.receiptStore.getInMainChain(hash, this.blockStore); if... |
@Test public void retrieveSimpleAccountTransfer() throws Exception { DslParser parser = DslParser.fromResource("dsl/transfers01.txt"); ReceiptStore receiptStore = new ReceiptStoreImpl(new HashMapDB()); World world = new World(receiptStore); WorldDslProcessor processor = new WorldDslProcessor(world); processor.processCo... | @Override public JsonNode traceTransaction(String transactionHash) throws Exception { logger.trace("trace_transaction({})", transactionHash); byte[] hash = stringHexToByteArray(transactionHash); TransactionInfo txInfo = this.receiptStore.getInMainChain(hash, this.blockStore); if (txInfo == null) { logger.trace("No tran... | TraceModuleImpl implements TraceModule { @Override public JsonNode traceTransaction(String transactionHash) throws Exception { logger.trace("trace_transaction({})", transactionHash); byte[] hash = stringHexToByteArray(transactionHash); TransactionInfo txInfo = this.receiptStore.getInMainChain(hash, this.blockStore); if... | TraceModuleImpl implements TraceModule { @Override public JsonNode traceTransaction(String transactionHash) throws Exception { logger.trace("trace_transaction({})", transactionHash); byte[] hash = stringHexToByteArray(transactionHash); TransactionInfo txInfo = this.receiptStore.getInMainChain(hash, this.blockStore); if... | TraceModuleImpl implements TraceModule { @Override public JsonNode traceTransaction(String transactionHash) throws Exception { logger.trace("trace_transaction({})", transactionHash); byte[] hash = stringHexToByteArray(transactionHash); TransactionInfo txInfo = this.receiptStore.getInMainChain(hash, this.blockStore); if... | TraceModuleImpl implements TraceModule { @Override public JsonNode traceTransaction(String transactionHash) throws Exception { logger.trace("trace_transaction({})", transactionHash); byte[] hash = stringHexToByteArray(transactionHash); TransactionInfo txInfo = this.receiptStore.getInMainChain(hash, this.blockStore); if... |
@Test public void executeContractWithCall() throws Exception { DslParser parser = DslParser.fromResource("dsl/call01.txt"); ReceiptStore receiptStore = new ReceiptStoreImpl(new HashMapDB()); World world = new World(receiptStore); WorldDslProcessor processor = new WorldDslProcessor(world); processor.processCommands(pars... | @Override public JsonNode traceTransaction(String transactionHash) throws Exception { logger.trace("trace_transaction({})", transactionHash); byte[] hash = stringHexToByteArray(transactionHash); TransactionInfo txInfo = this.receiptStore.getInMainChain(hash, this.blockStore); if (txInfo == null) { logger.trace("No tran... | TraceModuleImpl implements TraceModule { @Override public JsonNode traceTransaction(String transactionHash) throws Exception { logger.trace("trace_transaction({})", transactionHash); byte[] hash = stringHexToByteArray(transactionHash); TransactionInfo txInfo = this.receiptStore.getInMainChain(hash, this.blockStore); if... | TraceModuleImpl implements TraceModule { @Override public JsonNode traceTransaction(String transactionHash) throws Exception { logger.trace("trace_transaction({})", transactionHash); byte[] hash = stringHexToByteArray(transactionHash); TransactionInfo txInfo = this.receiptStore.getInMainChain(hash, this.blockStore); if... | TraceModuleImpl implements TraceModule { @Override public JsonNode traceTransaction(String transactionHash) throws Exception { logger.trace("trace_transaction({})", transactionHash); byte[] hash = stringHexToByteArray(transactionHash); TransactionInfo txInfo = this.receiptStore.getInMainChain(hash, this.blockStore); if... | TraceModuleImpl implements TraceModule { @Override public JsonNode traceTransaction(String transactionHash) throws Exception { logger.trace("trace_transaction({})", transactionHash); byte[] hash = stringHexToByteArray(transactionHash); TransactionInfo txInfo = this.receiptStore.getInMainChain(hash, this.blockStore); if... |
@Test public void executeContractWithDelegateCall() throws Exception { DslParser parser = DslParser.fromResource("dsl/delegatecall01.txt"); ReceiptStore receiptStore = new ReceiptStoreImpl(new HashMapDB()); World world = new World(receiptStore); WorldDslProcessor processor = new WorldDslProcessor(world); processor.proc... | @Override public JsonNode traceTransaction(String transactionHash) throws Exception { logger.trace("trace_transaction({})", transactionHash); byte[] hash = stringHexToByteArray(transactionHash); TransactionInfo txInfo = this.receiptStore.getInMainChain(hash, this.blockStore); if (txInfo == null) { logger.trace("No tran... | TraceModuleImpl implements TraceModule { @Override public JsonNode traceTransaction(String transactionHash) throws Exception { logger.trace("trace_transaction({})", transactionHash); byte[] hash = stringHexToByteArray(transactionHash); TransactionInfo txInfo = this.receiptStore.getInMainChain(hash, this.blockStore); if... | TraceModuleImpl implements TraceModule { @Override public JsonNode traceTransaction(String transactionHash) throws Exception { logger.trace("trace_transaction({})", transactionHash); byte[] hash = stringHexToByteArray(transactionHash); TransactionInfo txInfo = this.receiptStore.getInMainChain(hash, this.blockStore); if... | TraceModuleImpl implements TraceModule { @Override public JsonNode traceTransaction(String transactionHash) throws Exception { logger.trace("trace_transaction({})", transactionHash); byte[] hash = stringHexToByteArray(transactionHash); TransactionInfo txInfo = this.receiptStore.getInMainChain(hash, this.blockStore); if... | TraceModuleImpl implements TraceModule { @Override public JsonNode traceTransaction(String transactionHash) throws Exception { logger.trace("trace_transaction({})", transactionHash); byte[] hash = stringHexToByteArray(transactionHash); TransactionInfo txInfo = this.receiptStore.getInMainChain(hash, this.blockStore); if... |
@Test public void eth_sign() { Web3Impl web3 = createWeb3(); String addr1 = web3.personal_newAccountWithSeed("sampleSeed1"); byte[] hash = Keccak256Helper.keccak256("this is the data to hash".getBytes()); String signature = web3.eth_sign(addr1, "0x" + ByteUtil.toHexString(hash)); Assert.assertThat( signature, is("0xc8b... | @Override public String personal_newAccountWithSeed(String seed) { return personalModule.newAccountWithSeed(seed); } | Web3Impl implements Web3 { @Override public String personal_newAccountWithSeed(String seed) { return personalModule.newAccountWithSeed(seed); } } | Web3Impl implements Web3 { @Override public String personal_newAccountWithSeed(String seed) { return personalModule.newAccountWithSeed(seed); } protected Web3Impl(
Ethereum eth,
Blockchain blockchain,
BlockStore blockStore,
ReceiptStore receiptStore,
RskSyste... | Web3Impl implements Web3 { @Override public String personal_newAccountWithSeed(String seed) { return personalModule.newAccountWithSeed(seed); } protected Web3Impl(
Ethereum eth,
Blockchain blockchain,
BlockStore blockStore,
ReceiptStore receiptStore,
RskSyste... | Web3Impl implements Web3 { @Override public String personal_newAccountWithSeed(String seed) { return personalModule.newAccountWithSeed(seed); } protected Web3Impl(
Ethereum eth,
Blockchain blockchain,
BlockStore blockStore,
ReceiptStore receiptStore,
RskSyste... |
@Test public void executeContractWithCreate2() throws Exception { DslParser parser = DslParser.fromResource("dsl/create201.txt"); ReceiptStore receiptStore = new ReceiptStoreImpl(new HashMapDB()); World world = new World(receiptStore); WorldDslProcessor processor = new WorldDslProcessor(world); processor.processCommand... | @Override public JsonNode traceTransaction(String transactionHash) throws Exception { logger.trace("trace_transaction({})", transactionHash); byte[] hash = stringHexToByteArray(transactionHash); TransactionInfo txInfo = this.receiptStore.getInMainChain(hash, this.blockStore); if (txInfo == null) { logger.trace("No tran... | TraceModuleImpl implements TraceModule { @Override public JsonNode traceTransaction(String transactionHash) throws Exception { logger.trace("trace_transaction({})", transactionHash); byte[] hash = stringHexToByteArray(transactionHash); TransactionInfo txInfo = this.receiptStore.getInMainChain(hash, this.blockStore); if... | TraceModuleImpl implements TraceModule { @Override public JsonNode traceTransaction(String transactionHash) throws Exception { logger.trace("trace_transaction({})", transactionHash); byte[] hash = stringHexToByteArray(transactionHash); TransactionInfo txInfo = this.receiptStore.getInMainChain(hash, this.blockStore); if... | TraceModuleImpl implements TraceModule { @Override public JsonNode traceTransaction(String transactionHash) throws Exception { logger.trace("trace_transaction({})", transactionHash); byte[] hash = stringHexToByteArray(transactionHash); TransactionInfo txInfo = this.receiptStore.getInMainChain(hash, this.blockStore); if... | TraceModuleImpl implements TraceModule { @Override public JsonNode traceTransaction(String transactionHash) throws Exception { logger.trace("trace_transaction({})", transactionHash); byte[] hash = stringHexToByteArray(transactionHash); TransactionInfo txInfo = this.receiptStore.getInMainChain(hash, this.blockStore); if... |
@Test public void visitUnsubscribe() { EthUnsubscribeRequest unsubscribe = new EthUnsubscribeRequest( JsonRpcVersion.V2_0, RskJsonRpcMethod.ETH_UNSUBSCRIBE, 35, new EthUnsubscribeParams(SAMPLE_SUBSCRIPTION_ID) ); when(emitter.unsubscribe(SAMPLE_SUBSCRIPTION_ID)) .thenReturn(true); assertThat( handler.visit(unsubscribe,... | @Override public JsonRpcResultOrError visit(EthUnsubscribeRequest request, ChannelHandlerContext ctx) { boolean unsubscribed = emitter.unsubscribe(request.getParams().getSubscriptionId()); return new JsonRpcBooleanResult(unsubscribed); } | RskJsonRpcHandler extends SimpleChannelInboundHandler<ByteBufHolder> implements RskJsonRpcRequestVisitor { @Override public JsonRpcResultOrError visit(EthUnsubscribeRequest request, ChannelHandlerContext ctx) { boolean unsubscribed = emitter.unsubscribe(request.getParams().getSubscriptionId()); return new JsonRpcBoolea... | RskJsonRpcHandler extends SimpleChannelInboundHandler<ByteBufHolder> implements RskJsonRpcRequestVisitor { @Override public JsonRpcResultOrError visit(EthUnsubscribeRequest request, ChannelHandlerContext ctx) { boolean unsubscribed = emitter.unsubscribe(request.getParams().getSubscriptionId()); return new JsonRpcBoolea... | RskJsonRpcHandler extends SimpleChannelInboundHandler<ByteBufHolder> implements RskJsonRpcRequestVisitor { @Override public JsonRpcResultOrError visit(EthUnsubscribeRequest request, ChannelHandlerContext ctx) { boolean unsubscribed = emitter.unsubscribe(request.getParams().getSubscriptionId()); return new JsonRpcBoolea... | RskJsonRpcHandler extends SimpleChannelInboundHandler<ByteBufHolder> implements RskJsonRpcRequestVisitor { @Override public JsonRpcResultOrError visit(EthUnsubscribeRequest request, ChannelHandlerContext ctx) { boolean unsubscribed = emitter.unsubscribe(request.getParams().getSubscriptionId()); return new JsonRpcBoolea... |
@Test public void visitSubscribe() { Channel channel = mock(Channel.class); ChannelHandlerContext ctx = mock(ChannelHandlerContext.class); when(ctx.channel()) .thenReturn(channel); when(emitter.visit(any(EthSubscribeNewHeadsParams.class), eq(channel))) .thenReturn(SAMPLE_SUBSCRIPTION_ID); assertThat( handler.visit(SAMP... | @Override public JsonRpcResultOrError visit(EthUnsubscribeRequest request, ChannelHandlerContext ctx) { boolean unsubscribed = emitter.unsubscribe(request.getParams().getSubscriptionId()); return new JsonRpcBooleanResult(unsubscribed); } | RskJsonRpcHandler extends SimpleChannelInboundHandler<ByteBufHolder> implements RskJsonRpcRequestVisitor { @Override public JsonRpcResultOrError visit(EthUnsubscribeRequest request, ChannelHandlerContext ctx) { boolean unsubscribed = emitter.unsubscribe(request.getParams().getSubscriptionId()); return new JsonRpcBoolea... | RskJsonRpcHandler extends SimpleChannelInboundHandler<ByteBufHolder> implements RskJsonRpcRequestVisitor { @Override public JsonRpcResultOrError visit(EthUnsubscribeRequest request, ChannelHandlerContext ctx) { boolean unsubscribed = emitter.unsubscribe(request.getParams().getSubscriptionId()); return new JsonRpcBoolea... | RskJsonRpcHandler extends SimpleChannelInboundHandler<ByteBufHolder> implements RskJsonRpcRequestVisitor { @Override public JsonRpcResultOrError visit(EthUnsubscribeRequest request, ChannelHandlerContext ctx) { boolean unsubscribed = emitter.unsubscribe(request.getParams().getSubscriptionId()); return new JsonRpcBoolea... | RskJsonRpcHandler extends SimpleChannelInboundHandler<ByteBufHolder> implements RskJsonRpcRequestVisitor { @Override public JsonRpcResultOrError visit(EthUnsubscribeRequest request, ChannelHandlerContext ctx) { boolean unsubscribed = emitter.unsubscribe(request.getParams().getSubscriptionId()); return new JsonRpcBoolea... |
@Test public void handlerDeserializesAndHandlesRequest() throws Exception { Channel channel = mock(Channel.class); ChannelHandlerContext ctx = mock(ChannelHandlerContext.class); when(ctx.channel()) .thenReturn(channel); when(serializer.deserializeRequest(any())) .thenReturn(SAMPLE_SUBSCRIBE_REQUEST); when(emitter.visit... | @Override public JsonRpcResultOrError visit(EthUnsubscribeRequest request, ChannelHandlerContext ctx) { boolean unsubscribed = emitter.unsubscribe(request.getParams().getSubscriptionId()); return new JsonRpcBooleanResult(unsubscribed); } | RskJsonRpcHandler extends SimpleChannelInboundHandler<ByteBufHolder> implements RskJsonRpcRequestVisitor { @Override public JsonRpcResultOrError visit(EthUnsubscribeRequest request, ChannelHandlerContext ctx) { boolean unsubscribed = emitter.unsubscribe(request.getParams().getSubscriptionId()); return new JsonRpcBoolea... | RskJsonRpcHandler extends SimpleChannelInboundHandler<ByteBufHolder> implements RskJsonRpcRequestVisitor { @Override public JsonRpcResultOrError visit(EthUnsubscribeRequest request, ChannelHandlerContext ctx) { boolean unsubscribed = emitter.unsubscribe(request.getParams().getSubscriptionId()); return new JsonRpcBoolea... | RskJsonRpcHandler extends SimpleChannelInboundHandler<ByteBufHolder> implements RskJsonRpcRequestVisitor { @Override public JsonRpcResultOrError visit(EthUnsubscribeRequest request, ChannelHandlerContext ctx) { boolean unsubscribed = emitter.unsubscribe(request.getParams().getSubscriptionId()); return new JsonRpcBoolea... | RskJsonRpcHandler extends SimpleChannelInboundHandler<ByteBufHolder> implements RskJsonRpcRequestVisitor { @Override public JsonRpcResultOrError visit(EthUnsubscribeRequest request, ChannelHandlerContext ctx) { boolean unsubscribed = emitter.unsubscribe(request.getParams().getSubscriptionId()); return new JsonRpcBoolea... |
@Test public void web3_ext_dumpState() { Ethereum rsk = mock(Ethereum.class); Blockchain blockchain = mock(Blockchain.class); MiningMainchainView mainchainView = mock(MiningMainchainView.class); NetworkStateExporter networkStateExporter = mock(NetworkStateExporter.class); Mockito.when(networkStateExporter.exportStatus(... | public void ext_dumpState() { Block bestBlcock = blockStore.getBestBlock(); logger.info("Dumping state for block hash {}, block number {}", bestBlcock.getHash(), bestBlcock.getNumber()); networkStateExporter.exportStatus(System.getProperty("user.dir") + "/" + "rskdump.json"); } | Web3RskImpl extends Web3Impl { public void ext_dumpState() { Block bestBlcock = blockStore.getBestBlock(); logger.info("Dumping state for block hash {}, block number {}", bestBlcock.getHash(), bestBlcock.getNumber()); networkStateExporter.exportStatus(System.getProperty("user.dir") + "/" + "rskdump.json"); } } | Web3RskImpl extends Web3Impl { public void ext_dumpState() { Block bestBlcock = blockStore.getBestBlock(); logger.info("Dumping state for block hash {}, block number {}", bestBlcock.getHash(), bestBlcock.getNumber()); networkStateExporter.exportStatus(System.getProperty("user.dir") + "/" + "rskdump.json"); } Web3RskImp... | Web3RskImpl extends Web3Impl { public void ext_dumpState() { Block bestBlcock = blockStore.getBestBlock(); logger.info("Dumping state for block hash {}, block number {}", bestBlcock.getHash(), bestBlcock.getNumber()); networkStateExporter.exportStatus(System.getProperty("user.dir") + "/" + "rskdump.json"); } Web3RskImp... | Web3RskImpl extends Web3Impl { public void ext_dumpState() { Block bestBlcock = blockStore.getBestBlock(); logger.info("Dumping state for block hash {}, block number {}", bestBlcock.getHash(), bestBlcock.getNumber()); networkStateExporter.exportStatus(System.getProperty("user.dir") + "/" + "rskdump.json"); } Web3RskImp... |
@Test public void getBlock_pending() { RskJsonRpcRequestException e = TestUtils .assertThrows(RskJsonRpcRequestException.class, () -> target.getBlock("pending")); assertEquals(UNIMPLEMENTED_ERROR_CODE, (int) e.getCode()); } | public Optional<Block> getBlock(String identifier) { if (PENDING.equals(identifier)) { throw unimplemented("This method doesn't support 'pending' as a parameter"); } Block block; if (LATEST.equals(identifier)) { block = blockchain.getBestBlock(); } else if (EARLIEST.equals(identifier)) { block = blockchain.getBlockByNu... | Web3InformationRetriever { public Optional<Block> getBlock(String identifier) { if (PENDING.equals(identifier)) { throw unimplemented("This method doesn't support 'pending' as a parameter"); } Block block; if (LATEST.equals(identifier)) { block = blockchain.getBestBlock(); } else if (EARLIEST.equals(identifier)) { bloc... | Web3InformationRetriever { public Optional<Block> getBlock(String identifier) { if (PENDING.equals(identifier)) { throw unimplemented("This method doesn't support 'pending' as a parameter"); } Block block; if (LATEST.equals(identifier)) { block = blockchain.getBestBlock(); } else if (EARLIEST.equals(identifier)) { bloc... | Web3InformationRetriever { public Optional<Block> getBlock(String identifier) { if (PENDING.equals(identifier)) { throw unimplemented("This method doesn't support 'pending' as a parameter"); } Block block; if (LATEST.equals(identifier)) { block = blockchain.getBestBlock(); } else if (EARLIEST.equals(identifier)) { bloc... | Web3InformationRetriever { public Optional<Block> getBlock(String identifier) { if (PENDING.equals(identifier)) { throw unimplemented("This method doesn't support 'pending' as a parameter"); } Block block; if (LATEST.equals(identifier)) { block = blockchain.getBestBlock(); } else if (EARLIEST.equals(identifier)) { bloc... |
@Test public void getBlock_invalidIdentifier() { RskJsonRpcRequestException e = TestUtils .assertThrows(RskJsonRpcRequestException.class, () -> target.getBlock("pending2")); assertEquals(INVALID_PARAM_ERROR_CODE, (int) e.getCode()); } | public Optional<Block> getBlock(String identifier) { if (PENDING.equals(identifier)) { throw unimplemented("This method doesn't support 'pending' as a parameter"); } Block block; if (LATEST.equals(identifier)) { block = blockchain.getBestBlock(); } else if (EARLIEST.equals(identifier)) { block = blockchain.getBlockByNu... | Web3InformationRetriever { public Optional<Block> getBlock(String identifier) { if (PENDING.equals(identifier)) { throw unimplemented("This method doesn't support 'pending' as a parameter"); } Block block; if (LATEST.equals(identifier)) { block = blockchain.getBestBlock(); } else if (EARLIEST.equals(identifier)) { bloc... | Web3InformationRetriever { public Optional<Block> getBlock(String identifier) { if (PENDING.equals(identifier)) { throw unimplemented("This method doesn't support 'pending' as a parameter"); } Block block; if (LATEST.equals(identifier)) { block = blockchain.getBestBlock(); } else if (EARLIEST.equals(identifier)) { bloc... | Web3InformationRetriever { public Optional<Block> getBlock(String identifier) { if (PENDING.equals(identifier)) { throw unimplemented("This method doesn't support 'pending' as a parameter"); } Block block; if (LATEST.equals(identifier)) { block = blockchain.getBestBlock(); } else if (EARLIEST.equals(identifier)) { bloc... | Web3InformationRetriever { public Optional<Block> getBlock(String identifier) { if (PENDING.equals(identifier)) { throw unimplemented("This method doesn't support 'pending' as a parameter"); } Block block; if (LATEST.equals(identifier)) { block = blockchain.getBestBlock(); } else if (EARLIEST.equals(identifier)) { bloc... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.