Skip to content

Chapter 7, Exercise 4: Confused on the Solution #249

Open
@vvronskyFX

Description

@vvronskyFX

I'm working through this exercise and it's been some time. I want to move forwards to Ch 8 but I really want to get this solution to work.

First thing that stands out here is the the instruction to "Create a testnet transaction that sends 60% of a single UTXO to mwJn1YPMq7y5F8J3LkC5Hxg9PHyZ5K4cFv The remaining amount minus fees should go back to your own change address. This should be a one-input, two-output transaction."

However, in the solution, the target_address is 'miKegze5FQNCnGw6PKyqUbYUeBa4x2hFeM'

Next is we need to include a fee in there but I don't see how I can set up a fee.

Next is the fact that we want 60% of the UTXO to be sent to the target address. I just put in a target_amount of 0.0002

All in all, i get a Hex code but when i run >>> print(tx_obj.sign_input(0, priv)) I get a FALSE output.

Here's the solution screenshot:
image

Here's my code within Exercise 4:
image

I couldn't find any solution online. Has anyone passed this exercise here?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions