BOXFoundation / boxd

Blockchain for BOX Payout
MIT License
40 stars 10 forks source link

[script/token.go:86] panic: runtime error: index out of range #197

Closed Jerick26 closed 5 years ago

Jerick26 commented 5 years ago
INFO[0016] wait for token balance of b1UduswZWZ3jdQ46gM7HgjzWWDhBtYE1dt5 reach 50000, timeout 30s  source="integration_tests/test_token.go:101" tag=integration_tests
INFO[0019] start to gen 10 address for circulation       source="integration_tests/circulation.go:36" tag=integration_tests
INFO[0019] start to create 10 accounts                   source="integration_tests/boxutil.go:259" tag=integration_tests
INFO[0021] b1UduswZWZ3jdQ46gM7HgjzWWDhBtYE1dt5 has 50000 box token  source="integration_tests/test_token.go:105" tag=integration_tests
INFO[0021] waiting for minersAddr has 1000000 at least on 127.0.0.1:19121  source="integration_tests/test_token.go:73" tag=integration_tests
INFO[0026] start to unlock all 10 tests accounts         source="integration_tests/circulation.go:40" tag=integration_tests
INFO[0026] send 500000 from b1qLpLBQhUg6UNciwgWH9Xh5MsSCbh6Pz3N to b1UduswZWZ3jdQ46gM7HgjzWWDhBtYE1dt5  source="integration_tests/test_token.go:84" tag=integration_tests
INFO[0031] b1qLpLBQhUg6UNciwgWH9Xh5MsSCbh6Pz3N issue 100000 box token  source="integration_tests/test_token.go:92" tag=integration_tests
panic: runtime error: index out of range

goroutine 607 [running]:
encoding/binary.littleEndian.Uint64(...)
    /usr/local/Cellar/go/1.11.1/libexec/src/encoding/binary/binary.go:76
github.com/BOXFoundation/boxd/script.(*Script).GetIssueParams(0xc010c4f5a8, 0x48229e0, 0xc00048b500, 0xc010c4f5c0)
    /Users/jerrypeen/go/src/github.com/BOXFoundation/boxd/script/token.go:86 +0x185
github.com/BOXFoundation/boxd/rpc/server.getTokenInfo(0x5590f17230bb5e9f, 0x2dc706d41e50257e, 0xc283dd9db418ccf7, 0x6ed4ce48445543d1, 0x1, 0xc000320270, 0x0, 0x0, 0x0, 0x0, ...)
    /Users/jerrypeen/go/src/github.com/BOXFoundation/boxd/rpc/server/rpc_transaction.go:256 +0x79
github.com/BOXFoundation/boxd/rpc/server.(*txServer).FundTransaction(0xc00033c4b0, 0x4c1ac40, 0xc010a644b0, 0xc010a644e0, 0xc00033c4b0, 0xc010a64420, 0x48f28a0)
    /Users/jerrypeen/go/src/github.com/BOXFoundation/boxd/rpc/server/rpc_transaction.go:222 +0x946
github.com/BOXFoundation/boxd/rpc/pb._TransactionCommand_FundTransaction_Handler(0x498dcc0, 0xc00033c4b0, 0x4c1ac40, 0xc010a644b0, 0xc0001183f0, 0x0, 0x0, 0x0, 0x76d88b20, 0x4114fff)
    /Users/jerrypeen/go/src/github.com/BOXFoundation/boxd/rpc/pb/transaction.pb.go:916 +0x23e
google.golang.org/grpc.(*Server).processUnaryRPC(0xc010a32c00, 0x4c1f8a0, 0xc000498a80, 0xc0107e8100, 0xc010928c30, 0x5325bd8, 0x0, 0x0, 0x0)
    /Users/jerrypeen/go/pkg/mod/google.golang.org/grpc@v1.15.0/server.go:982 +0x4cd
google.golang.org/grpc.(*Server).handleStream(0xc010a32c00, 0x4c1f8a0, 0xc000498a80, 0xc0107e8100, 0x0)
    /Users/jerrypeen/go/pkg/mod/google.golang.org/grpc@v1.15.0/server.go:1208 +0x1308
google.golang.org/grpc.(*Server).serveStreams.func1.1(0xc000468050, 0xc010a32c00, 0x4c1f8a0, 0xc000498a80, 0xc0107e8100)
    /Users/jerrypeen/go/pkg/mod/google.golang.org/grpc@v1.15.0/server.go:686 +0x9f
created by google.golang.org/grpc.(*Server).serveStreams.func1
    /Users/jerrypeen/go/pkg/mod/google.golang.org/grpc@v1.15.0/server.go:684 +0xa1
PANI[0031] rpc error: code = Unavailable desc = transport is closing  source="integration_tests/test_token.go:131" tag=integration_tests
INFO[0031] done TokenTest doTx                           source="integration_tests/test_token.go:53" tag=integration_tests
Jerick26 commented 5 years ago

reproduce steps:

  1. git checkout develop 89584fad34e7653c0c38293ecdeea9d9d2200098
  2. cd integration_tests
  3. ./integration_tests -nodes=true -scope=continue