Join GitHub today
GitHub is home to over 40 million developers working together to host and review code, manage projects, and build software together.Sign up
I'm experiencing an issue when trying to send my whole account balance to myslef (on a private node, for academic purposes). The problem is that as i start the private NEO node, my account balance is 100000000 NEO, as 1 UTXO. What happens when i try to create an AssetTransfer from this account to itself, sending myself all NEO at once, it crashed because of a NullPointerException.
I think the problem is in the method getChangeTransactionOutput in class AssetTranfer. When the inputAmount and requiredValue are equal, the method returns null, which gets inserted into the array of the outputs for this AssetTransfer. This eventually crashes at io.neow3j.io.BinaryWriter.writeSerializableFixed(BinaryWriter.java:139) - it tries to call serialize on a null value.
The same issue happens when i try to send 1 NEO to myself more than once. First time it works, then my guess is the input calculation strategy chose the 1 NEO UTXO as input, and it crashed on a nullpointer as well.
I'm just beginning with blockchain technology at all, so i might have missed something, but since such a transfer works fine using the RCP API directly, i figured out this might be an issue in this library.
Thanks and best regards,