Apply go fmt
This commit is contained in:
@@ -22,15 +22,15 @@ import (
|
||||
"github.com/vulcanize/vulcanizedb/libraries/shared/streamer"
|
||||
)
|
||||
|
||||
type GethRpcStorageFetcher struct{
|
||||
type GethRpcStorageFetcher struct {
|
||||
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{
|
||||
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 {
|
||||
accounts :=append(stateDiff.CreatedAccounts, stateDiff.UpdatedAccounts...)
|
||||
accounts := append(stateDiff.CreatedAccounts, stateDiff.UpdatedAccounts...)
|
||||
return append(accounts, stateDiff.DeletedAccounts...)
|
||||
}
|
||||
|
||||
@@ -27,9 +27,9 @@ import (
|
||||
)
|
||||
|
||||
type MockStoragediffStreamer struct {
|
||||
subscribeError error
|
||||
subscribeError error
|
||||
PassedPayloadChan chan statediff.Payload
|
||||
streamPayloads []statediff.Payload
|
||||
streamPayloads []statediff.Payload
|
||||
}
|
||||
|
||||
func (streamer *MockStoragediffStreamer) Stream(statediffPayloadChan chan statediff.Payload) (*rpc.ClientSubscription, error) {
|
||||
@@ -60,7 +60,6 @@ var _ = Describe("Geth RPC Storage Fetcher", func() {
|
||||
var storagediffRowChan chan utils.StorageDiffRow
|
||||
var errorChan chan error
|
||||
|
||||
|
||||
BeforeEach(func() {
|
||||
streamer = MockStoragediffStreamer{}
|
||||
statediffPayloadChan = make(chan statediff.Payload, 1)
|
||||
@@ -128,4 +127,4 @@ var _ = Describe("Geth RPC Storage Fetcher", func() {
|
||||
|
||||
close(done)
|
||||
})
|
||||
})
|
||||
})
|
||||
|
||||
@@ -33,4 +33,3 @@ var _ = Describe("StateDiff Streamer", func() {
|
||||
client.AssertSubscribeCalledWith("statediff", payloadChan, []interface{}{"stream"})
|
||||
})
|
||||
})
|
||||
|
||||
|
||||
@@ -48,7 +48,7 @@ var (
|
||||
anotherContractAddress = common.HexToAddress("0xaE9BEa628c4Ce503DcFD7E305CaB4e29E7476593")
|
||||
AnotherContractLeafKey = crypto.Keccak256Hash(anotherContractAddress[:])
|
||||
|
||||
testAccount = state.Account{
|
||||
testAccount = state.Account{
|
||||
Nonce: NewNonceValue,
|
||||
Balance: big.NewInt(NewBalanceValue),
|
||||
Root: ContractRoot,
|
||||
@@ -125,4 +125,3 @@ var (
|
||||
Err: errors.New("mock error"),
|
||||
}
|
||||
)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user