Skip to content

Commit

Permalink
rename field "type" (#4015)
Browse files Browse the repository at this point in the history
* save

* save

* save
  • Loading branch information
AskAlexSharov authored Apr 28, 2022
1 parent bd3b734 commit 352869f
Show file tree
Hide file tree
Showing 5 changed files with 11 additions and 11 deletions.
2 changes: 1 addition & 1 deletion cmd/rpcdaemon/commands/txpool_api.go
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ func (api *TxPoolAPIImpl) Content(ctx context.Context) (map[string]map[string]ma
return nil, err
}
addr := common.BytesToAddress(reply.Txs[i].Sender)
switch reply.Txs[i].Type {
switch reply.Txs[i].TxnType {
case proto_txpool.AllReply_PENDING:
if _, ok := pending[addr]; !ok {
pending[addr] = make([]types.Transaction, 0, 4)
Expand Down
2 changes: 1 addition & 1 deletion core/rawdb/accessors_chain.go
Original file line number Diff line number Diff line change
Expand Up @@ -751,7 +751,7 @@ func MakeBodiesNonCanonical(tx kv.RwTx, from uint64, ctx context.Context, logPre
return err
}
if k != nil && binary.BigEndian.Uint64(k) >= firstMovedTxnID {
panic(fmt.Sprintf("must not happen, ResetSequence: %d, lastInDB: %d\n", firstMovedTxnID, binary.BigEndian.Uint64(k)))
panic(fmt.Sprintf("must not happen, ResetSequence: %d, lastInDB: %d", firstMovedTxnID, binary.BigEndian.Uint64(k)))
}

if err := ResetSequence(tx, kv.EthTx, firstMovedTxnID); err != nil {
Expand Down
12 changes: 6 additions & 6 deletions ethdb/privateapi/txpool.go
Original file line number Diff line number Diff line change
Expand Up @@ -53,9 +53,9 @@ func (s *TxPoolServer) All(context.Context, *proto_txpool.AllRequest) (*proto_tx
return nil, err
}
reply.Txs = append(reply.Txs, &proto_txpool.AllReply_Tx{
Sender: addrBytes,
Type: proto_txpool.AllReply_PENDING,
RlpTx: b,
Sender: addrBytes,
TxnType: proto_txpool.AllReply_PENDING,
RlpTx: b,
})
}
}
Expand All @@ -68,9 +68,9 @@ func (s *TxPoolServer) All(context.Context, *proto_txpool.AllRequest) (*proto_tx
return nil, err
}
reply.Txs = append(reply.Txs, &proto_txpool.AllReply_Tx{
Sender: addrBytes,
Type: proto_txpool.AllReply_QUEUED,
RlpTx: b,
Sender: addrBytes,
TxnType: proto_txpool.AllReply_QUEUED,
RlpTx: b,
})
}
}
Expand Down
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ require (
github.com/json-iterator/go v1.1.12
github.com/julienschmidt/httprouter v1.3.0
github.com/kevinburke/go-bindata v3.21.0+incompatible
github.com/ledgerwatch/erigon-lib v0.0.0-20220428023445-93d5aff56db3
github.com/ledgerwatch/erigon-lib v0.0.0-20220428075533-47ef59e2157e
github.com/ledgerwatch/log/v3 v3.4.1
github.com/ledgerwatch/secp256k1 v1.0.0
github.com/pelletier/go-toml v1.9.5
Expand Down
4 changes: 2 additions & 2 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -454,8 +454,8 @@ github.com/kylelemons/godebug v0.0.0-20170224010052-a616ab194758 h1:0D5M2HQSGD3P
github.com/kylelemons/godebug v0.0.0-20170224010052-a616ab194758/go.mod h1:B69LEHPfb2qLo0BaaOLcbitczOKLWTsrBG9LczfCD4k=
github.com/leanovate/gopter v0.2.9 h1:fQjYxZaynp97ozCzfOyOuAGOU4aU/z37zf/tOujFk7c=
github.com/leanovate/gopter v0.2.9/go.mod h1:U2L/78B+KVFIx2VmW6onHJQzXtFb+p5y3y2Sh+Jxxv8=
github.com/ledgerwatch/erigon-lib v0.0.0-20220428023445-93d5aff56db3 h1:mzi/H/OK2MRm9eVRPPHCTi97y7dy2Ix5pb5KbQ3BTnY=
github.com/ledgerwatch/erigon-lib v0.0.0-20220428023445-93d5aff56db3/go.mod h1:Z6hOzGMPdbzDcCs+EV5CEl/a6zOpgXqXL0K5956iXUc=
github.com/ledgerwatch/erigon-lib v0.0.0-20220428075533-47ef59e2157e h1:PncTET2FyVA1PQM+K4vL3Q2Pk1d/iw6yEJfMLkGUZhA=
github.com/ledgerwatch/erigon-lib v0.0.0-20220428075533-47ef59e2157e/go.mod h1:Z6hOzGMPdbzDcCs+EV5CEl/a6zOpgXqXL0K5956iXUc=
github.com/ledgerwatch/log/v3 v3.4.1 h1:/xGwlVulXnsO9Uq+tzaExc8OWmXXHU0dnLalpbnY5Bc=
github.com/ledgerwatch/log/v3 v3.4.1/go.mod h1:VXcz6Ssn6XEeU92dCMc39/g1F0OYAjw1Mt+dGP5DjXY=
github.com/ledgerwatch/secp256k1 v1.0.0 h1:Usvz87YoTG0uePIV8woOof5cQnLXGYa162rFf3YnwaQ=
Expand Down

0 comments on commit 352869f

Please sign in to comment.