Skip to content

Commit

Permalink
bump up to 0.10.2 (#383)
Browse files Browse the repository at this point in the history
  • Loading branch information
jingweicb authored Jan 18, 2023
1 parent f476c00 commit 87f7b06
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 3 deletions.
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ RUN mkdir -p "$GOPATH/src" "$GOPATH/bin" && chmod -R 777 "$GOPATH"

WORKDIR /go/src

ARG VERSION=v0.10.1
ARG VERSION=v0.10.2
RUN git clone https://github.com/coinbase/rosetta-cli.git && \
cd rosetta-cli && \
git fetch --all --tags && \
Expand Down
2 changes: 1 addition & 1 deletion cmd/root.go
Original file line number Diff line number Diff line change
Expand Up @@ -488,6 +488,6 @@ var versionCmd = &cobra.Command{
Use: "version",
Short: "Print rosetta-cli version",
Run: func(cmd *cobra.Command, args []string) {
fmt.Println("v0.10.1")
fmt.Println("v0.10.2")
},
}
14 changes: 13 additions & 1 deletion pkg/processor/balance_storage_helper.go
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,13 @@ func NewBalanceStorageHelper(
// Pre-process exemptAccounts on initialization
// to provide fast lookup while syncing.
for _, account := range exemptAccounts {
exemptMap[types.Hash(account)] = struct{}{}
// if users do not specify Currency, we add the address
// by this, all the Currencies in this address will be skipped
if account.Currency == nil {
exemptMap[account.Account.Address] = struct{}{}
} else {
exemptMap[types.Hash(account)] = struct{}{}
}
}

return &BalanceStorageHelper{
Expand Down Expand Up @@ -144,6 +150,12 @@ func (h *BalanceStorageHelper) ExemptFunc() parser.ExemptOperation {
return true
}
}
// if exemptAccounts have the Account address means all the
// currencies in this Account address need to be skipped
_, existsAddress := h.exemptAccounts[op.Account.Address]
if existsAddress {
return existsAddress
}

thisAcct := types.Hash(&types.AccountCurrency{
Account: op.Account,
Expand Down

0 comments on commit 87f7b06

Please sign in to comment.