Coverage Summary for Class: Ethereum (org.ethereum.facade)
Class |
Ethereum$MockitoMock$1494532525 |
Ethereum$MockitoMock$1494532525$auxiliary$igf14aDN |
Ethereum$MockitoMock$1494532525$auxiliary$YmNMIBEz |
Total |
1 /*
2 * This file is part of RskJ
3 * Copyright (C) 2017 RSK Labs Ltd.
4 * (derived from ethereumJ library, Copyright (c) 2016 <ether.camp>)
5 *
6 * This program is free software: you can redistribute it and/or modify
7 * it under the terms of the GNU Lesser General Public License as published by
8 * the Free Software Foundation, either version 3 of the License, or
9 * (at your option) any later version.
10 *
11 * This program is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 * GNU Lesser General Public License for more details.
15 *
16 * You should have received a copy of the GNU Lesser General Public License
17 * along with this program. If not, see <http://www.gnu.org/licenses/>.
18 */
19
20 package org.ethereum.facade;
21
22 import co.rsk.core.Coin;
23 import org.ethereum.core.Block;
24 import org.ethereum.core.ImportResult;
25 import org.ethereum.core.Transaction;
26 import org.ethereum.listener.EthereumListener;
27
28 /**
29 * @author Roman Mandeleil
30 * @since 27.07.2014
31 */
32 public interface Ethereum {
33
34 void addListener(EthereumListener listener);
35
36 void removeListener(EthereumListener listener);
37
38 ImportResult addNewMinedBlock(Block block);
39
40 /**
41 * @param transaction submit transaction to the net, return option to wait for net
42 * return this transaction as approved
43 */
44 void submitTransaction(Transaction transaction);
45
46 /**
47 * Calculates a 'reasonable' Gas price based on statistics of the latest transaction's Gas prices
48 * Normally the price returned should be sufficient to execute a transaction since ~25% of the latest
49 * transactions were executed at this or lower price.
50 * If the transaction is wanted to be executed promptly with higher chances the returned price might
51 * be increased at some ratio (e.g. * 1.2)
52 */
53 Coin getGasPrice();
54 }