Skip to content

Commit

Permalink
remove sout
Browse files Browse the repository at this point in the history
  • Loading branch information
kayfhan committed Sep 24, 2019
1 parent 0d2a882 commit 4c868c6
Show file tree
Hide file tree
Showing 7 changed files with 5 additions and 25 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -223,12 +223,12 @@ public static boolean validateForSmartContract(Deposit deposit, byte[] ownerAddr
}

if (deposit.getAssetIssue(tokenIdWithoutLeadingZero) == null) {
System.out.println(Hex.toHexString(tokenIdWithoutLeadingZero));
System.out.println("deposit.getAssetIssue(tokenIdWithoutLeadingZero) == null");
// System.out.println(Hex.toHexString(tokenIdWithoutLeadingZero));
// System.out.println("deposit.getAssetIssue(tokenIdWithoutLeadingZero) == null");
throw new ContractValidateException("No asset !");
}
if (!deposit.getDbManager().getAssetIssueStoreFinal().has(tokenIdWithoutLeadingZero)) {
System.out.println("!deposit.getDbManager().getAssetIssueStoreFinal().has(tokenIdWithoutLeadingZero)");
// System.out.println("!deposit.getDbManager().getAssetIssueStoreFinal().has(tokenIdWithoutLeadingZero)");
throw new ContractValidateException("No asset !");
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,11 +48,11 @@ public boolean hasNext() {
dbIterator.close();
}
} catch (Exception e) {
System.out.println("e:" + e);
// System.out.println("e:" + e);
try {
dbIterator.close();
} catch (Exception e1) {
System.out.println("e1:" + e1);
// System.out.println("e1:" + e1);
}
}
return hasNext;
Expand Down
2 changes: 0 additions & 2 deletions src/main/java/org/gsc/db/dbsource/DepositImpl.java
Original file line number Diff line number Diff line change
Expand Up @@ -358,7 +358,6 @@ public synchronized Storage getStorage(byte[] address) {
@Override
public synchronized AssetIssueWrapper getAssetIssue(byte[] tokenId) {
byte[] tokenIdWithoutLeadingZero = ByteUtil.stripLeadingZeroes(tokenId);
System.out.println("tokenIdWithoutLeadingZero" + tokenIdWithoutLeadingZero);
Key key = Key.create(tokenIdWithoutLeadingZero);
if (assetIssueCache.containsKey(key)) {
return assetIssueCache.get(key).getAssetIssue();
Expand All @@ -373,7 +372,6 @@ public synchronized AssetIssueWrapper getAssetIssue(byte[] tokenId) {
if (assetIssueWrapper != null) {
assetIssueCache.put(key, Value.create(assetIssueWrapper.getData()));
}
System.out.println("assetIssueWrapper.getId()" + assetIssueWrapper.getId());
return assetIssueWrapper;
}

Expand Down
7 changes: 0 additions & 7 deletions src/main/java/org/gsc/runtime/RuntimeImpl.java
Original file line number Diff line number Diff line change
Expand Up @@ -212,11 +212,6 @@ public long getAccountCpuLimitWithFixRatio(AccountWrapper account, long feeLimit
long availableCpu = Math.addExact(leftFrozenCpu, cpuFromBalance);

long cpuFromFeeLimit = feeLimit / dotPerCpu;
System.out.println("dotPerCpu: " + dotPerCpu);
System.out.println("leftFrozenCpu: " + leftFrozenCpu);
System.out.println("cpuFromBalance: " + cpuFromBalance);
System.out.println("availableCpu: " + availableCpu);
System.out.println("cpuFromFeeLimit: " + cpuFromFeeLimit);
return min(availableCpu, cpuFromFeeLimit);

}
Expand Down Expand Up @@ -321,8 +316,6 @@ public long getTotalCpuLimitWithFixRatio(AccountWrapper creator, AccountWrapper
);
}
}
System.out.println("callerCpuLimit: " + callerCpuLimit);
System.out.println("creatorCpuLimit: " + creatorCpuLimit);
return Math.addExact(callerCpuLimit, creatorCpuLimit);
}

Expand Down
7 changes: 0 additions & 7 deletions src/main/java/org/gsc/runtime/utils/MUtil.java
Original file line number Diff line number Diff line change
Expand Up @@ -56,8 +56,6 @@ public static void transferToken(Deposit deposit, byte[] fromAddress, byte[] toA
if (0 == amount) {
return;
}
System.out.println("deposit--- fromAddress: " + Hex.toHexString(fromAddress) + ", " +
"toAddress: " + Hex.toHexString(toAddress) + ", tokenId.getBytes():" + Hex.toHexString(tokenId.getBytes()) + ", amount" + amount);
TransferAssetOperator
.validateForSmartContract(deposit, fromAddress, toAddress, tokenId.getBytes(), amount);
deposit.addTokenBalance(toAddress, tokenId.getBytes(), amount);
Expand All @@ -74,9 +72,4 @@ public static byte[] convertToGSCAddress(byte[] address) {
}
return address;
}

public static void main(String[] args) {
byte[] adddr = Hex.decode("63ab67ead97e4f48de58f76e3d32a72d5b774251");
System.out.println(Hex.toHexString(convertToGSCAddress(adddr)));
}
}
1 change: 0 additions & 1 deletion src/main/java/org/gsc/services/http/Util.java
Original file line number Diff line number Diff line change
Expand Up @@ -720,7 +720,6 @@ public static boolean getVisibleOnlyForSign(JSONObject jsonObject) {
public static String parseMethod(String methodSign, String input) {
byte[] selector = new byte[4];
System.arraycopy(Hash.sha3(methodSign.getBytes()), 0, selector, 0, 4);
//System.out.println(methodSign + ":" + Hex.toHexString(selector));
if (StringUtils.isNullOrEmpty(input)) {
return Hex.toHexString(selector);
}
Expand Down
3 changes: 0 additions & 3 deletions src/main/java/org/gsc/utils/Base58.java
Original file line number Diff line number Diff line change
Expand Up @@ -78,18 +78,15 @@ public static byte[] decode(String input) throws IllegalArgumentException {
if (input.length() == 0) {
return new byte[0];
}
// System.out.println("input: " + input);
byte[] input58 = new byte[input.length()];
// Transform the String to a base58 byte sequence
for (int i = 0; i < input.length(); ++i) {
char c = input.charAt(i);

// System.out.println("c: " + c);
int digit58 = -1;
if (c >= 0 && c < 128) {
digit58 = INDEXES[c];
}
// System.out.println("digit58: " + digit58);
if (digit58 < 0) {
throw new IllegalArgumentException("Illegal character " + c + " at " + i);
}
Expand Down

0 comments on commit 4c868c6

Please sign in to comment.