Skip to content

Commit 8577680

Browse files
committed
rollback wrong commit
1 parent c2382a8 commit 8577680

File tree

2 files changed

+8
-11
lines changed

2 files changed

+8
-11
lines changed

pkg/api/converters.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ import (
2121

2222
func toError(code int, err error) *oas.ErrorStatusCode {
2323
msg := err.Error()
24-
if strings.HasPrefix(err.Error(), "failed to connect to") {
24+
if strings.HasPrefix(err.Error(), "failed to connect to") || strings.Contains(err.Error(), "host=") {
2525
msg = "unknown error"
2626
}
2727
return &oas.ErrorStatusCode{StatusCode: code, Response: oas.Error{Error: msg}}

pkg/bath/bubble.go

+7-10
Original file line numberDiff line numberDiff line change
@@ -71,13 +71,10 @@ func fromTrace(trace *core.Trace) *Bubble {
7171
}
7272
var initInterfaces []abi.ContractInterface
7373
if msg := trace.InMsg; msg != nil {
74-
if msg.IhrFee > 0 {
75-
// We want to include ihr_fee into msg.Value
76-
msg.Value += msg.IhrFee
77-
}
7874
btx.bounce = msg.Bounce
7975
btx.bounced = msg.Bounced
80-
btx.inputAmount = msg.Value
76+
btx.inputAmount += msg.Value
77+
btx.inputAmount += msg.IhrFee
8178
btx.opCode = msg.OpCode
8279
btx.decodedBody = msg.DecodedBody
8380
btx.inputFrom = source
@@ -111,11 +108,11 @@ func fromTrace(trace *core.Trace) *Bubble {
111108
// That's why we add tons here
112109
b.ValueFlow.AddTons(trace.Account, -c.InMsg.Value)
113110
}
114-
if c.InMsg.IhrFee > 0 {
115-
// We want to include ihr_fee into msg.Value
116-
aggregatedFee -= c.InMsg.IhrFee
117-
b.ValueFlow.Accounts[trace.Account].Ton -= c.InMsg.IhrFee
118-
}
111+
112+
// We want to include ihr_fee into msg.Value
113+
aggregatedFee -= c.InMsg.IhrFee
114+
b.ValueFlow.Accounts[trace.Account].Ton -= c.InMsg.IhrFee
115+
119116
b.Children[i] = fromTrace(c)
120117
}
121118
if actionPhase := trace.Transaction.ActionPhase; actionPhase != nil {

0 commit comments

Comments
 (0)