forked from cerc-io/ipld-eth-server
Apply go formatting
This commit is contained in:
parent
a577811e0a
commit
70fcc22a00
@ -1,13 +1,19 @@
|
||||
package streamer_test
|
||||
|
||||
import (
|
||||
"io/ioutil"
|
||||
"testing"
|
||||
|
||||
. "github.com/onsi/ginkgo"
|
||||
. "github.com/onsi/gomega"
|
||||
"github.com/sirupsen/logrus"
|
||||
)
|
||||
|
||||
func TestStreamer(t *testing.T) {
|
||||
RegisterFailHandler(Fail)
|
||||
RunSpecs(t, "Streamer Suite")
|
||||
}
|
||||
|
||||
var _ = BeforeSuite(func() {
|
||||
logrus.SetOutput(ioutil.Discard)
|
||||
})
|
||||
|
@ -80,7 +80,7 @@ func (storageWatcher StorageWatcher) Execute(rows chan utils.StorageDiffRow, err
|
||||
|
||||
func (storageWatcher StorageWatcher) getTransformer(contractAddress common.Address) (transformer.StorageTransformer, bool) {
|
||||
if storageWatcher.diffSource == "csv" {
|
||||
storageTransformer, ok := storageWatcher.Transformers[contractAddress]
|
||||
storageTransformer, ok := storageWatcher.Transformers[contractAddress]
|
||||
return storageTransformer, ok
|
||||
} else if storageWatcher.diffSource == "geth" {
|
||||
logrus.Debug("number of transformers", len(storageWatcher.Transformers))
|
||||
@ -96,7 +96,6 @@ func (storageWatcher StorageWatcher) getTransformer(contractAddress common.Addre
|
||||
return nil, false
|
||||
}
|
||||
|
||||
|
||||
func (storageWatcher StorageWatcher) processRow(row utils.StorageDiffRow) {
|
||||
storageTransformer, ok := storageWatcher.getTransformer(row.Contract)
|
||||
if !ok {
|
||||
|
@ -52,8 +52,8 @@ var _ = Describe("Storage Watcher", func() {
|
||||
mockFetcher *mocks.MockStorageFetcher
|
||||
mockQueue *mocks.MockStorageQueue
|
||||
mockTransformer *mocks.MockStorageTransformer
|
||||
csvRow utils.StorageDiffRow
|
||||
gethRow utils.StorageDiffRow
|
||||
csvRow utils.StorageDiffRow
|
||||
gethRow utils.StorageDiffRow
|
||||
rows chan utils.StorageDiffRow
|
||||
storageWatcher watcher.StorageWatcher
|
||||
)
|
||||
@ -291,7 +291,7 @@ var _ = Describe("Storage Watcher", func() {
|
||||
})
|
||||
})
|
||||
|
||||
Describe("where diff source is geth RPC pub sub", func() {
|
||||
Describe("where diff source is geth RPC pub sub", func() {
|
||||
BeforeEach(func() {
|
||||
mockQueue.RowsToReturn = []utils.StorageDiffRow{gethRow}
|
||||
storageWatcher = watcher.NewStorageWatcher(mockFetcher, test_config.NewTestDB(test_config.NewTestNode()))
|
||||
|
Loading…
Reference in New Issue
Block a user