chore: log

This commit is contained in:
2021-01-01 22:38:28 +08:00
parent de0184e253
commit 0941f9e340
2 changed files with 3 additions and 2 deletions

View File

@@ -64,14 +64,14 @@ impl ContractEngineCredit {
"query" => {
let params: CreditContractQueryParameters = serde_json::from_str(&tx_body.parameters)?;
let c = load_credit_contract(&params.name)?;
information!("Query: {}, credit: {}", &params.account, c.query(tx, &params.account));
success!("Query: {}, credit: {}", &params.account, c.query(tx, &params.account));
},
"query_all" => {
let params: CreditContractQueryAllParameters = serde_json::from_str(&tx_body.parameters)?;
let c = load_credit_contract(&params.name)?;
let map = c.query_all(tx);
map.iter().for_each(|(k , v)| {
information!("Query: {}, credit: {}", k, v);
success!("Query: {}, credit: {}", k, v);
});
},
_ => return simple_error!("Unknown action: {}", action),