Skip to content

Commit 49ac4b7

Browse files
committed
fix bug : signature do not to base64
1 parent e0fe895 commit 49ac4b7

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

src/main/java/org/tron/core/capsule/TransactionCapsule.java

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -221,11 +221,10 @@ public boolean checkBalance(byte[] address, byte[] to, long amount, long balance
221221
return true;
222222
}
223223

224-
@Deprecated
225224
public void sign(byte[] privateKey) {
226225
ECKey ecKey = ECKey.fromPrivate(privateKey);
227226
ECDSASignature signature = ecKey.sign(getRawHash().getBytes());
228-
ByteString sig = ByteString.copyFrom(signature.toBase64().getBytes());
227+
ByteString sig = ByteString.copyFrom(signature.toByteArray());
229228
this.transaction = this.transaction.toBuilder().addSignature(sig).build();
230229
}
231230

0 commit comments

Comments
 (0)