Coverage Summary for Class: ImmutableTransaction (org.ethereum.core)
Class |
Method, %
|
Line, %
|
ImmutableTransaction |
50%
(1/2)
|
66.7%
(2/3)
|
ImmutableTransaction$ImmutableTransactionException |
0%
(0/1)
|
0%
(0/2)
|
Total |
33.3%
(1/3)
|
40%
(2/5)
|
1 package org.ethereum.core;
2
3 /**
4 * Created by ajlopez on 02/08/2017.
5 */
6 public class ImmutableTransaction extends Transaction {
7 public ImmutableTransaction(byte[] rawData) {
8 super(rawData);
9 }
10
11 @Override
12 public void sign(byte[] privKeyBytes) {
13 throw new ImmutableTransactionException(String.format("trying to sign tx=%s", this.getHash()));
14 }
15
16 public static class ImmutableTransactionException extends RuntimeException {
17 public ImmutableTransactionException(String message) {
18 super("Immutable transaction: " + message);
19 }
20 }
21 }