Skip to content

Commit

Permalink
fix(get_account): remove repeated bandwidth cal
Browse files Browse the repository at this point in the history
  • Loading branch information
Wenhua Zhang committed Oct 31, 2018
1 parent 4ac754b commit e637e2b
Showing 1 changed file with 2 additions and 8 deletions.
10 changes: 2 additions & 8 deletions src/main/java/org/tron/core/services/http/GetAccountServlet.java
Original file line number Diff line number Diff line change
Expand Up @@ -35,10 +35,7 @@ protected void doGet(HttpServletRequest request, HttpServletResponse response) {
JsonFormat.merge(jsonObject.toJSONString(), build);
Account reply = wallet.getAccount(build.build());
if (reply != null) {
AccountCapsule accountCapsule = new AccountCapsule(reply);
BandwidthProcessor processor = new BandwidthProcessor(dbManager);
processor.updateUsage(accountCapsule);
response.getWriter().println(JsonFormat.printToString(accountCapsule.getInstance()));
response.getWriter().println(JsonFormat.printToString(reply));
} else {
response.getWriter().println("{}");
}
Expand All @@ -60,10 +57,7 @@ protected void doPost(HttpServletRequest request, HttpServletResponse response)
JsonFormat.merge(account, build);
Account reply = wallet.getAccount(build.build());
if (reply != null) {
AccountCapsule accountCapsule = new AccountCapsule(reply);
BandwidthProcessor processor = new BandwidthProcessor(dbManager);
processor.updateUsage(accountCapsule);
response.getWriter().println(JsonFormat.printToString(accountCapsule.getInstance()));
response.getWriter().println(JsonFormat.printToString(reply));
} else {
response.getWriter().println("{}");
}
Expand Down

0 comments on commit e637e2b

Please sign in to comment.