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

bitcoin-tx: Fix JSON validation of prevtxs #5528

Merged
merged 3 commits into from
Dec 31, 2014
Merged

bitcoin-tx: Fix JSON validation of prevtxs #5528

merged 3 commits into from
Dec 31, 2014

Conversation

ers35
Copy link
Contributor

@ers35 ers35 commented Dec 23, 2014

No description provided.

@ers35
Copy link
Contributor Author

ers35 commented Dec 23, 2014

I had not actually tested bitcoin-tx with 2a3d988. With a089c50 I can sign a tx like so (already compromised private key):

bitcoin-tx -create -json \
'set=privatekeys:["5HpHagT65TZzG1PH3CSu63k8DbpvD8s5ip4nEB3kEsreAnchuDf"]' \
'set=prevtxs:[{"txid":"4d49a71ec9da436f71ec4ee231d04f292a29cd316f598bb7068feccabdc59485","vout":0,"scriptPubKey":"4d49a71ec9da436f71ec4ee231d04f292a29cd316f598bb7068feccabdc59485"}]' \
'sign=' \
'outaddr=0.00000001:193P6LtvS4nCnkDvM9uXn1gsSRqh4aDAz7'
{
    "txid": "184c7a9d2115ccc2f2ab9f112b6cc430d6fa9ba2dd05e96e21bd063ca1b05c61",
    "version": 1,
    "locktime": 0,
    "vin": [
    ],
    "vout": [
        {
            "value": 0.00000001,
            "n": 0,
            "scriptPubKey": {
                "asm": "OP_DUP OP_HASH160 5834479edbbe0539b31ffd3a8f8ebadc2165ed01 OP_EQUALVERIFY OP_CHECKSIG",
                "hex": "76a9145834479edbbe0539b31ffd3a8f8ebadc2165ed0188ac",
                "reqSigs": 1,
                "type": "pubkeyhash",
                "addresses": [
                    "193P6LtvS4nCnkDvM9uXn1gsSRqh4aDAz7"
                ]
            }
        }
    ],
    "hex": "01000000000101000000000000001976a9145834479edbbe0539b31ffd3a8f8ebadc2165ed0188ac00000000"
}

@jonasschnelli
Copy link
Contributor

ACK

1 similar comment
@jgarzik
Copy link
Contributor

jgarzik commented Dec 23, 2014

ACK

@jgarzik jgarzik merged commit 2c14d15 into bitcoin:master Dec 31, 2014
jgarzik pushed a commit that referenced this pull request Dec 31, 2014
branch 'bitcoin-tx-copy-paste' of git://github.com/ers35/bitcoin into merge-5528
@jgarzik
Copy link
Contributor

jgarzik commented Dec 31, 2014

tested re-ACK

@jgarzik jgarzik added this to the 0.10.0 milestone Jan 6, 2015
laanwj pushed a commit that referenced this pull request Jan 6, 2015
reddink pushed a commit to reddcoin-project/reddcoin-3.10 that referenced this pull request May 27, 2020
Github-Pull: bitcoin#5528
Rebased-From: 2a3d988 a089c50 2c14d15
(cherry picked from commit 06fdf32)
@bitcoin bitcoin locked as resolved and limited conversation to collaborators Sep 8, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants