forked from cerc-io/ipld-eth-server
Apply go fmt
This commit is contained in:
parent
dc06991605
commit
ee244ac6f5
@ -22,12 +22,12 @@ import (
|
|||||||
"github.com/vulcanize/vulcanizedb/libraries/shared/streamer"
|
"github.com/vulcanize/vulcanizedb/libraries/shared/streamer"
|
||||||
)
|
)
|
||||||
|
|
||||||
type GethRpcStorageFetcher struct{
|
type GethRpcStorageFetcher struct {
|
||||||
statediffPayloadChan chan statediff.Payload
|
statediffPayloadChan chan statediff.Payload
|
||||||
streamer streamer.Streamer
|
streamer streamer.Streamer
|
||||||
}
|
}
|
||||||
|
|
||||||
func NewGethRpcStorageFetcher(streamer streamer.Streamer, statediffPayloadChan chan statediff.Payload) GethRpcStorageFetcher{
|
func NewGethRpcStorageFetcher(streamer streamer.Streamer, statediffPayloadChan chan statediff.Payload) GethRpcStorageFetcher {
|
||||||
return GethRpcStorageFetcher{
|
return GethRpcStorageFetcher{
|
||||||
statediffPayloadChan: statediffPayloadChan,
|
statediffPayloadChan: statediffPayloadChan,
|
||||||
streamer: streamer,
|
streamer: streamer,
|
||||||
@ -64,6 +64,6 @@ func (fetcher *GethRpcStorageFetcher) FetchStorageDiffs(out chan<- utils.Storage
|
|||||||
}
|
}
|
||||||
|
|
||||||
func getAccountDiffs(stateDiff statediff.StateDiff) []statediff.AccountDiff {
|
func getAccountDiffs(stateDiff statediff.StateDiff) []statediff.AccountDiff {
|
||||||
accounts :=append(stateDiff.CreatedAccounts, stateDiff.UpdatedAccounts...)
|
accounts := append(stateDiff.CreatedAccounts, stateDiff.UpdatedAccounts...)
|
||||||
return append(accounts, stateDiff.DeletedAccounts...)
|
return append(accounts, stateDiff.DeletedAccounts...)
|
||||||
}
|
}
|
||||||
|
@ -60,7 +60,6 @@ var _ = Describe("Geth RPC Storage Fetcher", func() {
|
|||||||
var storagediffRowChan chan utils.StorageDiffRow
|
var storagediffRowChan chan utils.StorageDiffRow
|
||||||
var errorChan chan error
|
var errorChan chan error
|
||||||
|
|
||||||
|
|
||||||
BeforeEach(func() {
|
BeforeEach(func() {
|
||||||
streamer = MockStoragediffStreamer{}
|
streamer = MockStoragediffStreamer{}
|
||||||
statediffPayloadChan = make(chan statediff.Payload, 1)
|
statediffPayloadChan = make(chan statediff.Payload, 1)
|
||||||
|
@ -33,4 +33,3 @@ var _ = Describe("StateDiff Streamer", func() {
|
|||||||
client.AssertSubscribeCalledWith("statediff", payloadChan, []interface{}{"stream"})
|
client.AssertSubscribeCalledWith("statediff", payloadChan, []interface{}{"stream"})
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
|
|
||||||
|
@ -125,4 +125,3 @@ var (
|
|||||||
Err: errors.New("mock error"),
|
Err: errors.New("mock error"),
|
||||||
}
|
}
|
||||||
)
|
)
|
||||||
|
|
||||||
|
@ -66,7 +66,6 @@ func (client *MockRpcClient) Subscribe(namespace string, payloadChan interface{}
|
|||||||
return &subscription, nil
|
return &subscription, nil
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
func (client *MockRpcClient) AssertSubscribeCalledWith(namespace string, payloadChan chan statediff.Payload, args []interface{}) {
|
func (client *MockRpcClient) AssertSubscribeCalledWith(namespace string, payloadChan chan statediff.Payload, args []interface{}) {
|
||||||
Expect(client.passedNamespace).To(Equal(namespace))
|
Expect(client.passedNamespace).To(Equal(namespace))
|
||||||
Expect(client.passedPayloadChan).To(Equal(payloadChan))
|
Expect(client.passedPayloadChan).To(Equal(payloadChan))
|
||||||
|
Loading…
Reference in New Issue
Block a user