Skip to content

Commit

Permalink
fix bug : signature do not to base64
Browse files Browse the repository at this point in the history
  • Loading branch information
zergweak committed Jun 21, 2018
1 parent e0fe895 commit 49ac4b7
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions src/main/java/org/tron/core/capsule/TransactionCapsule.java
Original file line number Diff line number Diff line change
Expand Up @@ -221,11 +221,10 @@ public boolean checkBalance(byte[] address, byte[] to, long amount, long balance
return true;
}

@Deprecated
public void sign(byte[] privateKey) {
ECKey ecKey = ECKey.fromPrivate(privateKey);
ECDSASignature signature = ecKey.sign(getRawHash().getBytes());
ByteString sig = ByteString.copyFrom(signature.toBase64().getBytes());
ByteString sig = ByteString.copyFrom(signature.toByteArray());
this.transaction = this.transaction.toBuilder().addSignature(sig).build();
}

Expand Down

0 comments on commit 49ac4b7

Please sign in to comment.