mirror of
https://github.com/tendermint/tendermint.git
synced 2026-09-25 09:24:30 +00:00
Don't allow duplicates for light client providers (#7781)
* Allow for zero witness providers * Verify provider duplicates, fix tests * Add duplicate provider ID to the error * Return error on attempt to remove last witness * Verify duplicates when restoring from store
This commit is contained in:
@@ -11,7 +11,6 @@ import (
|
||||
"github.com/tendermint/tendermint/abci/example/kvstore"
|
||||
"github.com/tendermint/tendermint/libs/log"
|
||||
"github.com/tendermint/tendermint/light"
|
||||
"github.com/tendermint/tendermint/light/provider"
|
||||
httpp "github.com/tendermint/tendermint/light/provider/http"
|
||||
dbs "github.com/tendermint/tendermint/light/store/db"
|
||||
rpctest "github.com/tendermint/tendermint/rpc/test"
|
||||
@@ -74,7 +73,7 @@ func ExampleClient() {
|
||||
Hash: block.Hash(),
|
||||
},
|
||||
primary,
|
||||
[]provider.Provider{primary}, // NOTE: primary should not be used here
|
||||
nil,
|
||||
dbs.New(db),
|
||||
light.Logger(logger),
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user