BuildOnViction / tomochain-v1

The efficient blockchain for the token economy
https://tomochain.com
GNU Lesser General Public License v3.0
51 stars 22 forks source link

SDK fullnode stop due to tomox snapshot failed #642

Closed thanhnguyennguyen closed 5 years ago

thanhnguyennguyen commented 5 years ago
DEBUG[08-22|04:33:55] Snapshot process takes                   time=36.78µs   hash=1d9635…feff04
panic: interface conversion: interface {} is *types.Trade, not *tomox.Item

goroutine 508 [running]:
github.com/ethereum/go-ethereum/tomox.(*Tree).GetNode(0xc008c4ef00, 0xc00361e280, 0x20, 0x20, 0xc01259ad00, 0x2362420, 0xc00b4439d0, 0xb6310e)
        /home/ubuntu/go/src/github.com/ethereum/go-ethereum/build/_workspace/src/github.com/ethereum/go-ethereum/tomox/redblacktree.go:134 +0x1c9
github.com/ethereum/go-ethereum/tomox.(*Tree).Root(0xc008c4ef00, 0x1037b00, 0x14a5590)
        /home/ubuntu/go/src/github.com/ethereum/go-ethereum/build/_workspace/src/github.com/ethereum/go-ethereum/tomox/redblacktree.go:43 +0x67
github.com/ethereum/go-ethereum/tomox.(*OrderTree).Save(0xc00b8a0e60, 0x459c00, 0x0, 0x0)
        /home/ubuntu/go/src/github.com/ethereum/go-ethereum/build/_workspace/src/github.com/ethereum/go-ethereum/tomox/ordertree.go:75 +0x52
github.com/ethereum/go-ethereum/tomox.(*OrderBook).Restore(0xc00b8a0dc0, 0x0, 0x14f1d40, 0xc00027c040)
        /home/ubuntu/go/src/github.com/ethereum/go-ethereum/build/_workspace/src/github.com/ethereum/go-ethereum/tomox/orderbook.go:133 +0x168
github.com/ethereum/go-ethereum/tomox.(*TomoX).getAndCreateIfNotExisted(0xc0000df7a0, 0xc012878300, 0x8, 0x0, 0x7fda5abe9648, 0x0, 0x4625a8)
        /home/ubuntu/go/src/github.com/ethereum/go-ethereum/build/_workspace/src/github.com/ethereum/go-ethereum/tomox/tomox.go:669 +0xe4
github.com/ethereum/go-ethereum/tomox.(*TomoX).GetOrderBook(...)
thanhnguyennguyen commented 5 years ago

fixed in #663