Fix contract creation
This commit is contained in:
parent
50f6a21ba8
commit
4093fc9e65
|
@ -175,7 +175,7 @@ public class Transaction {
|
|||
}
|
||||
|
||||
public boolean isContractCreation() {
|
||||
return Arrays.equals(this.receiveAddress, ByteUtil.EMPTY_BYTE_ARRAY);
|
||||
return this.receiveAddress == null;
|
||||
}
|
||||
|
||||
/*********
|
||||
|
|
|
@ -170,14 +170,16 @@ public class Wallet {
|
|||
}
|
||||
|
||||
byte[] receiveAddress = transaction.getReceiveAddress();
|
||||
Account receiver = rows.get(Hex.toHexString(receiveAddress));
|
||||
if (receiver != null) {
|
||||
receiver.addPendingTransaction(transaction);
|
||||
|
||||
logger.info("Pending transaction added to " +
|
||||
"\n account: [{}], " +
|
||||
"\n tx: [{}]",
|
||||
Hex.toHexString(receiver.getAddress()), Hex.toHexString(transaction.getHash()));
|
||||
if(receiveAddress != null) {
|
||||
Account receiver = rows.get(Hex.toHexString(receiveAddress));
|
||||
if (receiver != null) {
|
||||
receiver.addPendingTransaction(transaction);
|
||||
|
||||
logger.info("Pending transaction added to " +
|
||||
"\n account: [{}], " +
|
||||
"\n tx: [{}]",
|
||||
Hex.toHexString(receiver.getAddress()), Hex.toHexString(transaction.getHash()));
|
||||
}
|
||||
}
|
||||
this.notifyListeners();
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue