Fix last block for aptos in contract-watcher (#546)
This commit is contained in:
parent
61d070e859
commit
68b0586205
|
@ -209,7 +209,7 @@ func newWatchersForMainnet() *watchersConfig {
|
||||||
celo: &config.CELO_MAINNET,
|
celo: &config.CELO_MAINNET,
|
||||||
rateLimit: rateLimitConfig{
|
rateLimit: rateLimitConfig{
|
||||||
evm: 1000,
|
evm: 1000,
|
||||||
solana: 3,
|
solana: 20,
|
||||||
terra: 10,
|
terra: 10,
|
||||||
aptos: 20,
|
aptos: 20,
|
||||||
oasis: 3,
|
oasis: 3,
|
||||||
|
|
|
@ -9,7 +9,6 @@ import (
|
||||||
|
|
||||||
"github.com/go-resty/resty/v2"
|
"github.com/go-resty/resty/v2"
|
||||||
"github.com/wormhole-foundation/wormhole-explorer/contract-watcher/internal/metrics"
|
"github.com/wormhole-foundation/wormhole-explorer/contract-watcher/internal/metrics"
|
||||||
"github.com/wormhole-foundation/wormhole-explorer/contract-watcher/support"
|
|
||||||
"go.uber.org/ratelimit"
|
"go.uber.org/ratelimit"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
@ -101,7 +100,7 @@ func (s *AptosSDK) GetLatestBlock(ctx context.Context) (uint64, error) {
|
||||||
if result.BlockHeight == "" {
|
if result.BlockHeight == "" {
|
||||||
return 0, fmt.Errorf("empty block height")
|
return 0, fmt.Errorf("empty block height")
|
||||||
}
|
}
|
||||||
return support.DecodeUint64(result.BlockHeight)
|
return strconv.ParseUint(result.BlockHeight, 10, 64)
|
||||||
}
|
}
|
||||||
|
|
||||||
func (s *AptosSDK) GetBlock(ctx context.Context, block uint64) (*GetBlockResult, error) {
|
func (s *AptosSDK) GetBlock(ctx context.Context, block uint64) (*GetBlockResult, error) {
|
||||||
|
|
Loading…
Reference in New Issue