File tree Expand file tree Collapse file tree 4 files changed +4
-9
lines changed
src/main/scala/io/iohk/ethereum Expand file tree Collapse file tree 4 files changed +4
-9
lines changed Original file line number Diff line number Diff line change @@ -48,8 +48,7 @@ trait StdConsensusBuilder extends ConsensusBuilder {
48
48
case Protocol .Ethash ⇒ buildEthashConsensus()
49
49
case Protocol .AtomixRaft ⇒ buildAtomixRaftConsensus()
50
50
}
51
- // TODO: why the fuck does it fail with npe?
52
- // log.info(s"Using '${protocol.name}' consensus [${consensus.getClass.getName}]")
51
+ log.info(s " Using ' ${protocol.name}' consensus [ ${consensus.getClass.getName}] " )
53
52
54
53
consensus
55
54
}
Original file line number Diff line number Diff line change @@ -9,14 +9,13 @@ import io.iohk.ethereum.consensus.blocks.TestBlockGenerator
9
9
import io .iohk .ethereum .consensus .ethash .EthashMiner .MinerMsg
10
10
import io .iohk .ethereum .consensus .ethash .blocks .{EthashBlockGenerator , EthashBlockGeneratorImpl }
11
11
import io .iohk .ethereum .consensus .ethash .validators .{EthashValidators , StdEthashValidators }
12
- import io .iohk .ethereum .consensus .validators ._
12
+ import io .iohk .ethereum .consensus .validators .Validators
13
13
import io .iohk .ethereum .domain .BlockchainImpl
14
14
import io .iohk .ethereum .ledger .BlockPreparator
15
15
import io .iohk .ethereum .ledger .Ledger .VMImpl
16
16
import io .iohk .ethereum .nodebuilder .Node
17
17
import io .iohk .ethereum .utils .{BlockchainConfig , Logger }
18
18
19
-
20
19
/**
21
20
* Implements standard Ethereum consensus (ethash PoW).
22
21
*/
Original file line number Diff line number Diff line change @@ -99,10 +99,7 @@ trait JsonMethodsImplicits {
99
99
100
100
to <- input.get(" to" ) match {
101
101
case Some (JString (s)) =>
102
- extractAddress(s).map {
103
- case addr if addr.toUInt256.isZero => None
104
- case addr => Some (addr)
105
- }
102
+ extractAddress(s).map(Some (_))
106
103
107
104
case Some (_) => Left (InvalidAddress )
108
105
case None => Right (None )
Original file line number Diff line number Diff line change @@ -20,7 +20,7 @@ case class TransactionRequest(
20
20
nonce = nonce.getOrElse(defaultNonce),
21
21
gasPrice = gasPrice.getOrElse(defaultGasPrice),
22
22
gasLimit = gasLimit.getOrElse(defaultGasLimit),
23
- receivingAddress = to,
23
+ receivingAddress = if (to.contains( Address ( 0 ))) None else to,
24
24
value = value.getOrElse(BigInt (0 )),
25
25
payload = data.getOrElse(ByteString .empty)
26
26
)
You can’t perform that action at this time.
0 commit comments