Skip to content

Commit

Permalink
Fix excess logging of composite swap (#1003)
Browse files Browse the repository at this point in the history
  • Loading branch information
prasannavl authored Dec 27, 2021
1 parent bd788ba commit 0035a7e
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/masternodes/mn_checks.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3556,7 +3556,7 @@ Res CPoolSwap::ExecuteSwap(CCustomCSView& view, std::vector<DCT_ID> poolIDs) {
}
intermediateView.Flush();

return Res::Ok(swapAmountResult.ToString());
return res;
}, static_cast<int>(height));

if (!poolResult) {
Expand Down
2 changes: 1 addition & 1 deletion src/masternodes/mn_checks.h
Original file line number Diff line number Diff line change
Expand Up @@ -485,7 +485,7 @@ class CPoolSwap {
std::vector<DCT_ID> CalculateSwaps(CCustomCSView& view);
Res ExecuteSwap(CCustomCSView& view, std::vector<DCT_ID> poolIDs);
std::vector<std::vector<DCT_ID>> CalculatePoolPaths(CCustomCSView& view);

CTokenAmount GetResult() { return CTokenAmount{obj.idTokenTo, result}; };
};

#endif // DEFI_MASTERNODES_MN_CHECKS_H
2 changes: 1 addition & 1 deletion src/masternodes/rpc_poolpair.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1081,10 +1081,10 @@ UniValue testpoolswap(const JSONRPCRequest& request) {
}
throw JSONRPCError(RPC_INVALID_REQUEST, errorMsg);
}

for (const auto& id : poolIds) {
pools.push_back(id.ToString());
}
res.msg = compositeSwap.GetResult().ToString();
}
}
if (verbose) {
Expand Down

0 comments on commit 0035a7e

Please sign in to comment.