Pool: remove redundant prefix in txs table (#2603)

This commit is contained in:
Alex Sharov 2021-08-31 21:59:30 +07:00 committed by GitHub
parent d798d239f6
commit 143a0d0231
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 6 additions and 7 deletions

View File

@ -86,19 +86,18 @@ var rootCmd = &cobra.Command{
}
newTxs := make(chan txpool.Hashes, 1024)
senders := txpool.NewSendersCache()
txPool, err := txpool.New(newTxs, senders, txPoolDB, txpool.DefaultConfig)
txPool, err := txpool.New(newTxs, txPoolDB, txpool.DefaultConfig)
if err != nil {
return err
}
fetcher := txpool.NewFetch(cmd.Context(), sentryClientsCasted, txPool, senders, kvClient, coreDB, txPoolDB)
fetcher := txpool.NewFetch(cmd.Context(), sentryClientsCasted, txPool, kvClient, coreDB, txPoolDB)
fetcher.ConnectCore()
fetcher.ConnectSentries()
send := txpool.NewSend(cmd.Context(), sentryClients, txPool)
txpool.BroadcastLoop(cmd.Context(), txPoolDB, coreDB, txPool, senders, newTxs, send)
txpool.BroadcastLoop(cmd.Context(), txPoolDB, coreDB, txPool, newTxs, send)
return nil
},
}

2
go.mod
View File

@ -37,7 +37,7 @@ require (
github.com/julienschmidt/httprouter v1.3.0
github.com/kevinburke/go-bindata v3.21.0+incompatible
github.com/kylelemons/godebug v1.1.0 // indirect
github.com/ledgerwatch/erigon-lib v0.0.0-20210830044659-d47408751110
github.com/ledgerwatch/erigon-lib v0.0.0-20210831141709-6c5a46a28e8f
github.com/ledgerwatch/log/v3 v3.3.0
github.com/ledgerwatch/secp256k1 v0.0.0-20210626115225-cd5cd00ed72d
github.com/logrusorgru/aurora/v3 v3.0.0

4
go.sum
View File

@ -490,8 +490,8 @@ github.com/kylelemons/godebug v1.1.0 h1:RPNrshWIDI6G2gRW9EHilWtl7Z6Sb1BR0xunSBf0
github.com/kylelemons/godebug v1.1.0/go.mod h1:9/0rRGxNHcop5bhtWyNeEfOS8JIWk580+fNqagV/RAw=
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-20210830044659-d47408751110 h1:vj6GU1RKia23BNIXc/Q6Ba0C/2e+Fycj/6KkInlh7iw=
github.com/ledgerwatch/erigon-lib v0.0.0-20210830044659-d47408751110/go.mod h1:mer12uv2+HWhB+3cE1rAbD2+b/JVwCnIbG2Gyv9rmhA=
github.com/ledgerwatch/erigon-lib v0.0.0-20210831141709-6c5a46a28e8f h1:DJUxUjsGSN2gTYWu3SmEajEtGxhMcm+Te9FbvmFYB/Q=
github.com/ledgerwatch/erigon-lib v0.0.0-20210831141709-6c5a46a28e8f/go.mod h1:mer12uv2+HWhB+3cE1rAbD2+b/JVwCnIbG2Gyv9rmhA=
github.com/ledgerwatch/log/v3 v3.3.0 h1:k8N/3NQLILr8CKCMyza261vLFKU7VA+nMNNb0wVyQSc=
github.com/ledgerwatch/log/v3 v3.3.0/go.mod h1:J58eOHHrIYHxl7LKkRsb/0YibKwtLfauUryl5SLRGm0=
github.com/ledgerwatch/secp256k1 v0.0.0-20210626115225-cd5cd00ed72d h1:/IKMrJdfRsoYNc36PXqP4xMH3vhW/8IQyBKGQbKZUno=