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

nValue of CTxOut only holding 0 when at CreateNewBlock #15

Closed
neilc1 opened this issue Jun 25, 2017 · 2 comments
Closed

nValue of CTxOut only holding 0 when at CreateNewBlock #15

neilc1 opened this issue Jun 25, 2017 · 2 comments

Comments

@neilc1
Copy link

neilc1 commented Jun 25, 2017

Poking around with the debugger at CreateNewBlock. It seems that the nValue of all the CTxOuts taken from tx.vin and tx.vout are set to 0. For a quick check you can run the current tx's GetValueOut and it will report 0. I had to recompile with O0 in order to verify this. I recommend taking a look, as this would lead to a lot of weird behavior, like the transaction fee not being set properly. CCoinsViewCache is relaying that the txin does have coins, so I suspect the issue isn't far away. Although when accessing a given txin's previous output's vout, the nValue is also empty (src/miner/miner.cpp L418-L422)

@neilc1 neilc1 changed the title nValue in vin[n] and vout[n] only holding 0 when at CreateNewBlock nValue of CTxOut only holding 0 when at CreateNewBlock Jun 25, 2017
@gidgreen
Copy link
Contributor

By default MultiChain blockchains don't use a native currency, so the nValue should be zero.

@neilc1
Copy link
Author

neilc1 commented Jun 25, 2017

Gotcha, thanks for clarifying.

@neilc1 neilc1 closed this as completed Jun 25, 2017
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