Skip to content

Commit 87f7b06

Browse files
authored
bump up to 0.10.2 (#383)
1 parent f476c00 commit 87f7b06

File tree

3 files changed

+15
-3
lines changed

3 files changed

+15
-3
lines changed

Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ RUN mkdir -p "$GOPATH/src" "$GOPATH/bin" && chmod -R 777 "$GOPATH"
3131

3232
WORKDIR /go/src
3333

34-
ARG VERSION=v0.10.1
34+
ARG VERSION=v0.10.2
3535
RUN git clone https://github.com/coinbase/rosetta-cli.git && \
3636
cd rosetta-cli && \
3737
git fetch --all --tags && \

cmd/root.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -488,6 +488,6 @@ var versionCmd = &cobra.Command{
488488
Use: "version",
489489
Short: "Print rosetta-cli version",
490490
Run: func(cmd *cobra.Command, args []string) {
491-
fmt.Println("v0.10.1")
491+
fmt.Println("v0.10.2")
492492
},
493493
}

pkg/processor/balance_storage_helper.go

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,13 @@ func NewBalanceStorageHelper(
6565
// Pre-process exemptAccounts on initialization
6666
// to provide fast lookup while syncing.
6767
for _, account := range exemptAccounts {
68-
exemptMap[types.Hash(account)] = struct{}{}
68+
// if users do not specify Currency, we add the address
69+
// by this, all the Currencies in this address will be skipped
70+
if account.Currency == nil {
71+
exemptMap[account.Account.Address] = struct{}{}
72+
} else {
73+
exemptMap[types.Hash(account)] = struct{}{}
74+
}
6975
}
7076

7177
return &BalanceStorageHelper{
@@ -144,6 +150,12 @@ func (h *BalanceStorageHelper) ExemptFunc() parser.ExemptOperation {
144150
return true
145151
}
146152
}
153+
// if exemptAccounts have the Account address means all the
154+
// currencies in this Account address need to be skipped
155+
_, existsAddress := h.exemptAccounts[op.Account.Address]
156+
if existsAddress {
157+
return existsAddress
158+
}
147159

148160
thisAcct := types.Hash(&types.AccountCurrency{
149161
Account: op.Account,

0 commit comments

Comments
 (0)