This comment has been minimized.

Doc nit. API is a bit awkward with the amount of data that needs to be kept from the first issuance to the second, but I guess that's just how it is. I don't think it makes sense to try and improve the UX by bundling all that into a single blob. This is for advanced users only, I guess.

This comment has been minimized.

This comment has been minimized.

It's pretty much impossible to carry around a blob, since as soon as you spend the initial output, you'll have to update it. Would be nice to have something more straight forward, but indeed this is for power users.

This comment has been minimized.

edited

While adding the final TODO test, I ran into:

A couple blinding bugs in the wallet where it was looking at the wrong field, or didn't push the right values when amounts were 0 in certain initial issuance cases. I had forgotten how some of this issuance consensus logic worked and wrote it wrong, and current tests weren't quite catching it.

contract_hash for reissuance was unused. Heh. entropy field is enough to re-calculate everything in a reissuance. So the final test has a non-null contract test, though it ended up mostly testing (1) instead.

Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.