mirror of
https://github.com/dashpay/dash.git
synced 2024-12-26 20:42:59 +01:00
cd490905be
ce07638
doc: Add comment to use ValueFromAmount/AmountFromValue for JSON, not utilmoneystr (Wladimir J. van der Laan)ec05c50
rpc: Use ValueFromAmount instead of FormatMoney in TxToUniv (Wladimir J. van der Laan)46347ad
rpc: Move ValueFromAmount to core_write (Wladimir J. van der Laan)dac3782
doc: Correct AmountFromValue/ValueFromAmount names (Wladimir J. van der Laan) Pull request description: With this, the amounts returned in `decoderawtransaction` will be padded to 8 digits like anywhere else in the API. This is accomplished by using `ValueFromAmount` in `TxToUniv`, instead of `FormatMoney` which it currently (mistakingly) uses. The `FormatMoney` function is only for debugging/logging use! To avoid dependency issues, `ValueFromAmount` is moved to `core_write.cpp`, where it also fits better. I don't move `AmountFromValue` to `core_read.cpp` at the same time, as this would have more impact due to the RPCError dependency there. (n.b.: large number of changed files is solely due to the util_tests JSONs needing update) Tree-SHA512: 10fc2d27d33a77dbcb57aa7eccd4f53110c05d38eb7df6d40f10f14c08fad4274472e93af75aa59fe68ad0720fdf0930f0108124abef518e0dd162b3d2b2b292
45 lines
1.8 KiB
JSON
45 lines
1.8 KiB
JSON
{
|
|
"txid": "c14b007fa3a6c1e7765919c1d14c1cfc2b8642c3a5d3be4b1fa8c4ccfec98bb0",
|
|
"version": 2,
|
|
"size": 176,
|
|
"locktime": 0,
|
|
"vin": [
|
|
{
|
|
"txid": "5897de6bd6027a475eadd57019d4e6872c396d0716c4875a5f1a6fcfdf385c1f",
|
|
"vout": 0,
|
|
"scriptSig": {
|
|
"asm": "",
|
|
"hex": ""
|
|
},
|
|
"sequence": 4294967295
|
|
}
|
|
],
|
|
"vout": [
|
|
{
|
|
"value": 0.18000000,
|
|
"valueSat": 18000000,
|
|
"n": 0,
|
|
"scriptPubKey": {
|
|
"asm": "OP_DUP OP_HASH160 1fc11f39be1729bf973a7ab6a615ca4729d64574 OP_EQUALVERIFY OP_CHECKSIG",
|
|
"hex": "76a9141fc11f39be1729bf973a7ab6a615ca4729d6457488ac",
|
|
"reqSigs": 1,
|
|
"type": "pubkeyhash",
|
|
"addresses": [
|
|
"Xdak8YsJz8tm1iHFmycfTyKeUvHgfbdpyw"
|
|
]
|
|
}
|
|
},
|
|
{
|
|
"value": 0.00000000,
|
|
"valueSat": 0,
|
|
"n": 1,
|
|
"scriptPubKey": {
|
|
"asm": "OP_RETURN 54686973204f505f52455455524e207472616e73616374696f6e206f7574707574207761732063726561746564206279206d6f646966696564206372656174657261777472616e73616374696f6e2e",
|
|
"hex": "6a4c4f54686973204f505f52455455524e207472616e73616374696f6e206f7574707574207761732063726561746564206279206d6f646966696564206372656174657261777472616e73616374696f6e2e",
|
|
"type": "nulldata"
|
|
}
|
|
}
|
|
],
|
|
"hex": "02000000011f5c38dfcf6f1a5f5a87c416076d392c87e6d41970d5ad5e477a02d66bde97580000000000ffffffff0280a81201000000001976a9141fc11f39be1729bf973a7ab6a615ca4729d6457488ac0000000000000000526a4c4f54686973204f505f52455455524e207472616e73616374696f6e206f7574707574207761732063726561746564206279206d6f646966696564206372656174657261777472616e73616374696f6e2e00000000"
|
|
}
|