receiptID in tx.receipts is null ?
Closed this issue · 7 comments
csquan commented
when I get receiptID in tx.receipts is null ?is a bug ?
mikroskeem commented
It is. Please provide more information on the issue next time in the form of:
- What did you try to do (with code snippet to reproduce)
- What did you expect to see?
- What did you see instead?
csquan commented
I try to get receiptID from block 65906486,but it is null.
to verify it ,then I query mannet db ,find receiptID is not null.
what I expect is receiptID should be value equal to which in mannet db.
mikroskeem commented
Please provide a code example and the query you use to find the receiptID
from the database.
csquan commented
no code example.I just use api to get block,then get tx,receipt .
find receptID is null in every block,just test you can find it.
most likely unmarshal error.
csquan commented
mikroskeem commented
mikroskeem commented
Fixed in e8be92c
Tested with:
package main
import (
"context"
"github.com/eteu-technologies/near-api-go/pkg/client"
"github.com/eteu-technologies/near-api-go/pkg/config"
"github.com/eteu-technologies/near-api-go/pkg/types/hash"
"github.com/davecgh/go-spew/spew"
)
var (
txnHash = hash.MustCryptoHashFromBase58("AFYNx2sJ64Vwqx5LzgFbmhJ5hJbM8xFLvn93KwAW9YaL")
account = "app.nearcrowd.near"
)
func main() {
c := config.Networks["archival-mainnet"]
rpc, err := client.NewClient(c.NodeURL)
if err != nil {
panic(err)
}
ctx := context.Background()
res, err := rpc.TransactionStatusWithReceipts(ctx, txnHash, account)
if err != nil {
panic(err)
}
spew.Dump(res)
}