chainview: fix formatting

This commit is contained in:
Oliver Gugger 2022-03-22 13:54:27 +01:00
parent b08df8437e
commit 2195c71407
No known key found for this signature in database
GPG Key ID: 8E4256593F177720

View File

@ -553,8 +553,9 @@ func testFilterBlockDisconnected(node *rpctest.Harness,
}
// Init a chain view that has this node as its block source.
cleanUpFunc, reorgView, err := chainViewInit(reorgNode.RPCConfig(),
reorgNode.P2PAddress())
cleanUpFunc, reorgView, err := chainViewInit(
reorgNode.RPCConfig(), reorgNode.P2PAddress(),
)
if err != nil {
t.Fatalf("unable to create chain view: %v", err)
}
@ -775,7 +776,9 @@ var interfaceImpls = []struct {
}{
{
name: "bitcoind_zmq",
chainViewInit: func(_ rpcclient.ConnConfig, p2pAddr string) (func(), FilteredChainView, error) {
chainViewInit: func(_ rpcclient.ConnConfig,
p2pAddr string) (func(), FilteredChainView, error) {
// Start a bitcoind instance.
tempBitcoindDir, err := ioutil.TempDir("", "bitcoind")
if err != nil {
@ -855,7 +858,9 @@ var interfaceImpls = []struct {
},
{
name: "p2p_neutrino",
chainViewInit: func(_ rpcclient.ConnConfig, p2pAddr string) (func(), FilteredChainView, error) {
chainViewInit: func(_ rpcclient.ConnConfig,
p2pAddr string) (func(), FilteredChainView, error) {
spvDir, err := ioutil.TempDir("", "neutrino")
if err != nil {
return nil, nil, err
@ -908,7 +913,9 @@ var interfaceImpls = []struct {
},
{
name: "btcd_websockets",
chainViewInit: func(config rpcclient.ConnConfig, _ string) (func(), FilteredChainView, error) {
chainViewInit: func(config rpcclient.ConnConfig,
_ string) (func(), FilteredChainView, error) {
blockCache := blockcache.NewBlockCache(10000)
chainView, err := NewBtcdFilteredChainView(
config, blockCache,
@ -943,7 +950,9 @@ func TestFilteredChainView(t *testing.T) {
t.Logf("Testing '%v' implementation of FilteredChainView",
chainViewImpl.name)
cleanUpFunc, chainView, err := chainViewImpl.chainViewInit(rpcConfig, p2pAddr)
cleanUpFunc, chainView, err := chainViewImpl.chainViewInit(
rpcConfig, p2pAddr,
)
if err != nil {
t.Fatalf("unable to make chain view: %v", err)
}
@ -955,8 +964,10 @@ func TestFilteredChainView(t *testing.T) {
testName := fmt.Sprintf("%v: %v", chainViewImpl.name,
chainViewTest.name)
success := t.Run(testName, func(t *testing.T) {
chainViewTest.test(miner, chainView,
chainViewImpl.chainViewInit, t)
chainViewTest.test(
miner, chainView,
chainViewImpl.chainViewInit, t,
)
})
if !success {