network: keep a copy of the config inside of Server
Avoid copying the configuration again and again, make things a bit more efficient.
This commit is contained in:
parent
6e9d725a29
commit
60d6fa1125
3 changed files with 27 additions and 32 deletions
|
@ -813,7 +813,7 @@ func TestHandleMPTData(t *testing.T) {
|
|||
t.Run("good", func(t *testing.T) {
|
||||
expected := [][]byte{{1, 2, 3}, {2, 3, 4}}
|
||||
s := newTestServer(t, ServerConfig{Port: 0, UserAgent: "/test/"})
|
||||
s.chain.(*fakechain.FakeChain).P2PStateExchangeExtensions = true
|
||||
s.config.P2PStateExchangeExtensions = true
|
||||
s.stateSync = &fakechain.FakeStateSync{
|
||||
AddMPTNodesFunc: func(nodes [][]byte) error {
|
||||
require.Equal(t, expected, nodes)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue