Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ask for advice #1

Open
zhibin-chen opened this issue Feb 15, 2019 · 4 comments
Open

Ask for advice #1

zhibin-chen opened this issue Feb 15, 2019 · 4 comments

Comments

@zhibin-chen
Copy link

First, thank you for your project that I can learn from.

Process, I found:
part5_Tracsaction show error : com.esotericsoftware.kryo.KryoException:java.lang.IndexOutOfBoundsException: Index: 46, Size: 2.

Can you see it, please? Thanks.

@zhibin-chen
Copy link
Author

com.esotericsoftware.kryo.KryoException: java.lang.IndexOutOfBoundsException: Index: 46, Size: 2
Serialization trace:
prevBlockHash (cldy.hanru.blockchain.block.Block)
at com.esotericsoftware.kryo.serializers.ObjectField.read(ObjectField.java:144)
at com.esotericsoftware.kryo.serializers.FieldSerializer.read(FieldSerializer.java:543)
at com.esotericsoftware.kryo.Kryo.readClassAndObject(Kryo.java:813)
at cldy.hanru.blockchain.util.SerializeUtils.deserialize(SerializeUtils.java:33)
at cldy.hanru.blockchain.store.RocksDBUtils.getBlock(RocksDBUtils.java:117)
at cldy.hanru.blockchain.block.Blockchain$BlockchainIterator.hashNext(Blockchain.java:110)
at cldy.hanru.blockchain.block.Blockchain.getAllSpentTXOs(Blockchain.java:172)
at cldy.hanru.blockchain.block.Blockchain.findUnspentTransactions(Blockchain.java:203)
at cldy.hanru.blockchain.block.Blockchain.findUTXO(Blockchain.java:237)
at cldy.hanru.blockchain.cli.CLI.getBalance(CLI.java:204)
at cldy.hanru.blockchain.cli.CLI.run(CLI.java:89)
at cldy.hanru.blockchain.Main.main(Main.java:18)
Caused by: java.lang.IndexOutOfBoundsException: Index: 46, Size: 2
at java.util.ArrayList.rangeCheck(ArrayList.java:657)
at java.util.ArrayList.get(ArrayList.java:433)
at com.esotericsoftware.kryo.util.MapReferenceResolver.getReadObject(MapReferenceResolver.java:60)
at com.esotericsoftware.kryo.Kryo.readReferenceOrNull(Kryo.java:857)
at com.esotericsoftware.kryo.Kryo.readObjectOrNull(Kryo.java:780)
at com.esotericsoftware.kryo.serializers.ObjectField.read(ObjectField.java:132)
... 11 more

Process finished with exit code 0

@rubyhan1314
Copy link
Owner

你能贴一下区块的信息吗?还有就是运行交易的命令

@rubyhan1314
Copy link
Owner

运行printchain就行

@zhibin-chen
Copy link
Author

已解决,谢谢啦

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants