ethereum/ethereumj — pull request #178 by ligi (2014-12-25 00:25:49+00:00)
Title: simplify

the code could be much nicer and cleaner when transaction would be an interface and RLP-Parsed / directly set are implementations.
also perhaps caching the zeroDataBytes() count could then be easier cached and usages like this:

```java
long dataCost = tx.getData() == null ? 0:
tx.nonZeroDataBytes() * GasCost.TX_NO_ZERO_DATA +
tx.zeroDataBytes() * GasCost.TX_ZERO_DATA;
```

which traverse data 2 times even though this could be optimized as nonZeroDataBytes() is data.length-zeroDataBytes() and the other way around