HuobiRDCenter / huobi_Golang

Go SDK for Huobi Spot API
https://www.htx.com/zh-cn/opend/newApiPages/
Apache License 2.0
176 stars 86 forks source link

panic: d.nx != 0 #8

Closed shaodan closed 4 years ago

shaodan commented 4 years ago
panic: d.nx != 0

goroutine 85 [running]:
crypto/sha256.(*digest).checkSum(0xc00043d9f0, 0x0, 0x0, 0x0, 0x0)
        c:/go/src/crypto/sha256/sha256.go:234 +0x1e0
crypto/sha256.(*digest).Sum(0xc00009eb00, 0x0, 0x0, 0x0, 0xc0, 0xb6, 0x0)
        c:/go/src/crypto/sha256/sha256.go:210 +0x70
crypto/hmac.(*hmac).Sum(0xc0000ae840, 0x0, 0x0, 0x0, 0xb6, 0x0, 0x0)
        c:/go/src/crypto/hmac/hmac.go:46 +0x5d
github.com/huobirdcenter/huobi_golang/internal/requestbuilder.(*Signer).sign(0xc00005f250, 0xc00046cfc0, 0xb6, 0x40, 0xb6)
        C:/Users/Administrator/go/pkg/mod/github.com/huobirdcenter/huobi_golang@v0.0.0-20200512021252-ff2dd990478d/internal/requestbuilder/signer.go:40 +0xba
github.com/huobirdcenter/huobi_golang/internal/requestbuilder.(*Signer).Sign(0xc00005f250, 0xb1626e, 0x3, 0xb1be37, 0xd, 0xc000094960, 0x25, 0xc00046cf00, 0x7e, 0xc71190, ...)
        C:/Users/Administrator/go/pkg/mod/github.com/huobirdcenter/huobi_golang@v0.0.0-20200512021252-ff2dd990478d/internal/requestbuilder/signer.go:34 +0x39c
github.com/huobirdcenter/huobi_golang/internal/requestbuilder.(*PrivateUrlBuilder).BuildWithTime(0xc000106510, 0xb1626e, 0x3, 0xc000094960, 0x25, 0x2cd91da0, 0xed654903d, 0x0, 0x0, 0xc00043dd58, ...)
        C:/Users/Administrator/go/pkg/mod/github.com/huobirdcenter/huobi_golang@v0.0.0-20200512021252-ff2dd990478d/internal/requestbuilder/privateurlbuilder.go:55 +0x1c3
github.com/huobirdcenter/huobi_golang/internal/requestbuilder.(*PrivateUrlBuilder).Build(0xc000106510, 0xb1626e, 0x3, 0xc000094960, 0x25, 0x0, 0x8, 0xc000094960)
        C:/Users/Administrator/go/pkg/mod/github.com/huobirdcenter/huobi_golang@v0.0.0-20200512021252-ff2dd990478d/internal/requestbuilder/privateurlbuilder.go:41 +0xf2
github.com/huobirdcenter/huobi_golang/pkg/client.(*AccountClient).GetAccountBalance(0xc0000960b0, 0xb184b4, 0x8, 0x0, 0xc00043df58, 0xc0000c4000)
        C:/Users/Administrator/go/pkg/mod/github.com/huobirdcenter/huobi_golang@v0.0.0-20200512021252-ff2dd990478d/pkg/client/accountclient.go:49 +0xc6
shaodan commented 4 years ago

https://github.com/HuobiRDCenter/huobi_Golang/pull/9

eynzhang commented 4 years ago

@shaodan , thanks for the feedback, after I reviewed the code that looks reasonable. I will merge your code later.

shaodan commented 4 years ago

Hi @eynzhang, could you merge the request now?

filinvadim commented 4 years ago

Reopen please