Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,7 @@ public void run() {
callback.setUser(dtu);
try {
callback.recordStartTime();
callback.setTimeout(0);
dagTransfer.userAdd(user, amount, callback);
int current = sended.incrementAndGet();
if (current >= area && ((current % area) == 0)) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -177,17 +177,26 @@ public static List<Map<String, String>> parseSelectResult(String selectResult)

private List<Map<String, String>> getTableDescLessThan230Version(
EnumNodeVersion.Version enumNodeVersion, String tableName) throws ContractException {
List<Map<String, String>> tableDesc = new ArrayList<>();
if (enumNodeVersion.getMajor() == 2 && enumNodeVersion.getMinor() < 2) {
return select(
PrecompiledConstant.SYS_TABLE,
PrecompiledConstant.USER_TABLE_PREFIX + tableName,
new Condition());
tableDesc =
select(
PrecompiledConstant.SYS_TABLE,
PrecompiledConstant.USER_TABLE_PREFIX + tableName,
new Condition());
} else {
return select(
PrecompiledConstant.SYS_TABLE,
PrecompiledConstant.USER_TABLE_PREFIX_2_2_0_VERSION + tableName,
new Condition());
tableDesc =
select(
PrecompiledConstant.SYS_TABLE,
PrecompiledConstant.USER_TABLE_PREFIX_2_2_0_VERSION + tableName,
new Condition());
}
for (Map<String, String> item : tableDesc) {
if (item.containsKey(PrecompiledConstant.TABLE_NAME_FIELD)) {
item.remove(PrecompiledConstant.TABLE_NAME_FIELD);
}
}
return tableDesc;
}

private List<Map<String, String>> getTableDesc(String tableName) throws ContractException {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,4 +36,5 @@ public class PrecompiledConstant {

public static final String KEY_FIELD_NAME = "key_field";
public static final String VALUE_FIELD_NAME = "value_field";
public static final String TABLE_NAME_FIELD = "table_name";
}
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,8 @@ public class PrecompiledRetCode {
"The committee permission control by ChainGovernancePrecompiled are recommended");
public static final RetCode CODE_CONTRACT_NOT_EXIST =
new RetCode(-51003, "The contract is not exist");
public static final RetCode CODE_TABLE_NAME_OVERFLOW = new RetCode(-51002, "");
public static final RetCode CODE_TABLE_NAME_OVERFLOW =
new RetCode(-51002, "The table name string length exceeds the maximum limit");
public static final RetCode CODE_TABLE_AND_ADDRESS_NOT_EXIST =
new RetCode(-51001, "The table name and address not exist");
public static final RetCode CODE_TABLE_AND_ADDRESS_EXIST =
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@
import org.fisco.bcos.sdk.model.RevertMessageParser;
import org.fisco.bcos.sdk.model.TransactionReceipt;
import org.fisco.bcos.sdk.model.TransactionReceiptStatus;
import org.fisco.bcos.sdk.utils.Numeric;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

Expand Down Expand Up @@ -96,8 +97,9 @@ public static RetCode parseCallOutput(Call.CallOutput callResult, String message
RevertMessageParser.tryResolveRevertMessage(
callResult.getStatus(), callResult.getOutput());
if (errorOutput.getValue1()) {
return TransactionReceiptStatus.getStatusMessage(
callResult.getStatus(), errorOutput.getValue2());
return new RetCode(
Numeric.decodeQuantity(callResult.getStatus()).intValue(),
errorOutput.getValue2());
}
return TransactionReceiptStatus.getStatusMessage(callResult.getStatus(), message);
}
Expand Down