In case of the Keychain error or Transaction error, we only see the error string as some kind of keychain error, which looks like the un-finished job before.
Two main changes in this PR:
Keychain error and Transaction error use Fail string for each enum.
Give an error log and detailed error info on the post pool API, which will be useful for wallet:
let res = tx_pool.add_to_pool(source, tx, !fluff, &header);
let err_str = if let Err(e) = &res {
error!("Pushing transaction {} to pool failed: e = {}", tx_hash, e); <<<< Error Log
format!("Failed to update pool with e = {}", e) <<<< Post API Response Body
} else {
String::new()
};
res.context(ErrorKind::Internal(err_str))?;
In case of the Keychain error or Transaction error, we only see the error string as
some kind of keychain error
, which looks like the un-finished job before.Two main changes in this PR:
Fail
string for each enum.post
pool API, which will be useful for wallet: