Transactions

手動建立的交易金額為負

  • October 26, 2017

我想建立一個具有多個輸入和一個輸出的事務。我正在使用 json-rpc,呼叫createrawtransaction然後signrawtransaction.

呼叫後signrawtransaction我返回 a txid,但交易不會傳播到我在測試網路上擁有的另一個節點,我的假設是因為交易中顯示的金額是負數

呼叫gettransaction返回這個:

{
 "amount": -5.61005648,
 "fee": 0.00000000,
 "confirmations": 0,
 "trusted": true,
 "txid": "0181c3e4a9e3858c19437cde2b1a35baf1d5141634f0a01e4786ecffe395e505",
 "walletconflicts": [
 ],
 "time": 1508969268,
 "timereceived": 1508969268,
 "bip125-replaceable": "no",
 "details": [
   {
     "account": "",
     "address": "mtTCXP94vdVqUBD29GstBiD2hgLdYLHuoB",
     "category": "send",
     "amount": -5.61005648,
     "vout": 0,
     "fee": 0.00000000,
     "abandoned": false
   }
 ],
 "hex": "020000003476b4ab4ef3e57ccdba8fa8760295cdeacaea79109d7ff1aacfeee41ab37a2579010000006a4730440220031783b8653aaa7a2889146d6cf5c25fef52cb738aedab7049e1a6e008a8e8540220518b97af6bf016bc0ac5b14e812530df6246217d7fae9692f1a99551775ff03c012102cac0ca1e54c5c6438ca691abd9903abfb61cc71cb2698bd4e97933b933cb3905ffffffffb1d196f04779f11db7360498ddd83db7e1e5425168866f75ab8de75a7cbebf080100000069463043021f64e3f59e9a6c1a29af6a59e3f915d7473d4f5243996de9cc52328e703879240220248bff13946626138f9820c22e388662ee1291a5acd1d511ce49df0da98d46d601210318377fe071ca3e6a57c24051deab290412ea556a8d2ec3111b7a98d58edaf2cbffffffff46198db16ec6ccbf99b13cf8db3645d1ef4c8a16659006067a5b958dbad002ce010000006a47304402205379570e0aa2926d2b31e9b8598128eec342b89bf38937c88edc68cbaf610c9402203c7d56efe7931a9d52de12cd145ae875094c09aed60ac1749e6bca4eeea329bd0121026c04772fb727b1c7bdc78b08e94a75497ef09e0517f6f46fd0f19fade7eef9f9ffffffffea0175e882cf36658a459424f87f9d6e9890cea22772c98f7341ccbfe739f563010000006b4830450221009198ac960311624e76de202515d80bea56e50457a4c371ee3e040e68f5cd037002200c89f42b3bcbc8ec03b5bf383249b4633f5af221424ac9cd7e3d8e68fc6bf5f50121035c9fb02da0b5b6093b07ffef721d2e2da78e7066370d18782cb04fa483c1fa65ffffffffd088df69726bcf39c1d47c0fbe999056aaa54ec463efca67faf64322e43eed92010000006a4730440220791d810c7f721736c3211e00fcbed421f5d493bb9735946a021752cb2d8a4c1b022034f4a55dcf8588cb7a0084143ea3b1547a85b561321c3a553e2d1b2d5e9307bd012103e58a0428939661eca8717c4afab26f9d9901b77b699f2342f25535c6dd43fdc6ffffffffba9a66f3ca8d7f3fa67647b41cc153bf0fe3553feaf679b8912621fbabc91637000000006a4730440220204dcee4460648d435b2eb583243a2975d10e604affad20bd4d7f16a68ac08e80220311f728fc480f20b904db14c8d63955dfcc36b14b31013adc1f8bdacc51d41dd0121028c8be24f7b0befdf58685e886057571c8e6c19e7bff7710e9d595f19809f4b77ffffffffbccc04885991d142800fa75aec2054bc3d301e8e7551b3408afdadc72b5635b7010000006b483045022100d0c03c778b2ab970ac2b58fa6aa9a9640e1c28e9d59fc514addafea3a75d81f702206716f200b190341a20a13db7afff85bb679533b1f79d523517a4725aeb94b18b012102fc02aeb85dada76cd00627575e0197f760f93542dc952a7d0b8755b4fb590c89ffffffff5b3c5668138bda85a9fc07a401e88cb5936ee9a079ecb0aa114739f2fb76fe3c000000006b483045022100e61b11891064210c8d5a4cddcc3f422419bca4c2667e7fac4aa9530f939060dc02203941e690fdbc1828efedeb09ab24f685442f974628904f4aafc788413b843c9301210243b65b4c0c926789a01debf7d927592f3c0ed18d2384a0a894cae0809bfcd31fffffffff0092426f99015ea1f1f5def23f2a2bb7646a17d861141e7eaaa112d86dc3cef8010000006a4730440220345feaefb5df729306905722db40708a816e54edefc05c1c2af8cf86dd330eac02201aeef7841929e39467490ac0dbdbcbe7253f5f19b9f5025a054d20d6f36dcb0501210281d70666ab4b7a36674335d3df26cee3fd55a7490dcebb4b018e04fc687afc44ffffffffc3f16c1ebfe39b34babf335caf97564b2fe0aed5508acde10fe86159ebdc6b75010000006a47304402203b461d18218fe7c13284d46f67ca15ef2fb1255b3246e3db19a7e72e0e15092b022008202970b450e9353f2c614fc29fc1a30d3dae43875b0f7e88485109570b0a72012102642aeb4aba97ef8813b92f79423d3075dad53d88ab9a2d6f7f851659257cbd2fffffffff2e40b4f64573cef66f04410840152a86097116de8f6b2760e51b3193473359c1000000006a4730440220425ca743735f2eecf91283d9258e7bbcacb410b6118d1d222628b301a6bbe52d0220594b81533f4dce93638c4012047eabcc3c6819eef08fefdd5d89bfe2616e648401210372ba6a2a00b88c3d59656c7f256901f2e7120e1c356462bbd476ce9a8fc12e6affffffff639586e72f9b118d78fc1941ecea8a9693a14fa043b3dc3174a5d2917ff041b5000000006a47304402200beaaa93fee06d7f703516664def25904db6f92368e1258e3e1a814d9fe26cd7022066cd54522eef4cf8d56b6d4396e81292f1fc3948ac0b65be58855056e4137bd4012102b525c71503085ba61fdb322af7c7e8d6da085cab9fbb66df24c3ab03e83d31daffffffff02e08c253ad15177c7d7dbf8de05e104b7782b80452d79e49a48fa5e4fa06d18000000006b483045022100a3ea6bf203ee683e641a7ecca2bcc23d1e791309d129b1a27e0a0d46a5ece7d00220518400469a84098ab46387c8d0f754c2d16b13d28c60ec4c52e8cf23d753ef7b012102eee32cc2297a54ad148cb001d81bb3e6529c3d2d731f69e96b13b08d36b71505ffffffff19a5e29387b4d51311c1c7cd3c553c321b96ecef1a0010906f9b5ed9476879ab000000006a473044022010234769452213554af798d6fde3b382de36365729e72d651af583204b428217022035eef375d98d639aa97ab4bcb9f646f17c18b83ed826c65550f53631d7239023012102473c52eeeec28c96e51d0026f89353ddcaeb7f2d87f11a54cf17d9219553d112ffffffff8eb79ea377e392d07f8766ce58fbe643ab241c8bb3555ac186436222de7b658b000000006a473044022068b916fae128c70d63c49af0d05e14db5cd886fb7ff102ff86b41586ab8ef9b002201d03dcc028e968fcb62096723a01a6c6f06bf533010bab3713f54e8af984d4ca01210261322bdee17b60e437d4ab021a6042ea3d7e0d0f5a018d330a87765ff3e6e593ffffffffb7b515eaac12d8c00719cdddba238ee997dc7da8d2426036a07b4e155c80c91d010000006a47304402206c5019c0548a285d921165d04400084e0752548f379977307fe9d6070e4b14d1022030fe399517d2982fbf1358093cc0dce0196c11672a49df7792c80c4dd152443f0121025ea66f4c2041e33d5bc67a033fcd1de412858ed3e588cc089740c3c32e73519affffffffa126098bdc1ad952f5f57b1c68d884f43d977da9c20ea4e84b67e05c9f2e9700010000006b483045022100e6a51d5403c2540aaa5a8c2da2049dff24e6a64d618dc5ff81476972be58443202203d25249eeff82c8f441fd85278bd60e8bbe8ce9d288083696a68caf922fc718c012102d2d7c30886731631c97d5ecadcea6a864bfb0d04b0b87054d6f9efa11e9b3e54ffffffff8aae87800de4a49651ce9e4f4e06649818ed9c3b0f777c8931a02eb6b814c87d010000006946304302207d84c19070648e590a70d35601bd796bb028085b8effd8688685b52f41a9c3cf021f797a83d7d438317d9bcf0b1ec6651638889cf411e65d7460861ecccdbe02fb012102c51f6c31ccee770da608958dc38976d349a73035f62a28ce1c5652ca9909f3c4ffffffffa389c1a6221f5cc009321411b7cee38ba74746df2f3d32a29f1dd79ecd4108bd010000006b483045022100cdacc9c1fe0bd2b49850f5ee816cd273d3e891c83111706b10ee9871ede0035202204b78a00bec2a020d6cecbe322f6cfc6fcd4461da4e67df7167f9859f1dda0f350121022dad3da455cf8aa00fabaf0e602bffaa09501233ee9780499fdc41c716ec8c71ffffffff47d8db809944e15a459161d27cc730edc0a2fc426f56f0a28d14ff5dbdcb1448000000006b483045022100d1df9fa43b0d818cb08a5d1d5164a86f832f0ce70b272da51fb9810ca4c5a7cb022054ee8a58d2093d9130353c9e8eed86520aa9cf7bff182de687db64ef3573e60e012103413e8ea9c8314767e989519d68390d9c598b419bc3391f87768dda3a7c0ce08cffffffffd356673d04d1b39d7c8d13fc8821d4e3bb1f8998b8bd579a986baa5b2e46b0d3010000006b4830450221008771d69bcae79d9ad8e989a762334636d3b16b900d195c430dcbd1832af70a63022015b243b9b655f200803b7dd3a80d2ffcf72ac596bdb75e970f6243260a9487b8012103d2c44b673928dccc81e5f3fdd9f56c1bc95c368133a3d9ef0cca57c850afef0cffffffff1b2d04c29e5e73ddb365d49d68ad197fb5de749c6cc05ca792da588552c034a0010000006b483045022100a0acfcd5da4e6604548c0f0a6535800b4abda2e9a8798bb02ea3dfe5f808474902206f1460ffd9366921f2caa7fa15b52374f118cb09ce74c967107dfb3b4b2d229801210308f1298e6f17920ba9b57c904e034d64b86e9e5e607df668135d4c4b8d28bdedffffffff714a0ae9183d2f8179e431684fbef9bd09bef53e225851e18eab5ed41af9c2f3000000006a47304402201deefdfeafe81dcc30e77478fdab440bd215245d81911cbbcc7e3c30fc4e429402204d231ed70a7b57afc9d9b2cb4ca5682f85998bf7e15cc95bb8653b1eee00bdd5012103b85bdf8cebc4224c00d7c15bcc486549ab18cb5cbc83847d32c36b65f89c9f2affffffff1f21e50a5a955a30bc6aa90e507f00596d480b781ca653d96b0d8aaf6ca8edc3000000006a47304402201df812f9940250e212a56cac5961299e9e37a3d80f233f9283d2a619b669e72002202be63db5cf130f6ffeabd0069909a292883c9f60d24f673fba6d7e2d7d684d47012102c137caf5e5f394daf8c7812510e73a490ecfdd5013db155c350bba375da2c468fffffffff4049f42736afc8ebd7c20fff3d6faa6a6530d39bb86d7b0704827957ce3d760010000006a473044022003e10ddcad1bbd6a88d0513b66089fc0a2d338dbd1e75b5f7b670ab1c10ccc4002203859d87e3e9504faa7e17e5a8114061ea622040a0a14f311e67ec851bda3b489012102ead4feb97f0b51a058a8500e696abdef6eec8c50124a7ee2b726f19a83f296bbffffffff3dbdab24f9ee7657d0bf7f300dbd3fcdebd891b10696db8dfe215e21aa312fed010000006a4730440220072e05c441cc2dd4628eed0f2c04ea6548fd4f3c531a3549ccf71ac71f037ae1022053a2327a8904d5dd7ecd969d4b3a0064d72ccd0e44f14f32fcf3c17ae22309da01210392a38fb37e0851055848f7ae643618b500743eda4cd5fbdfccc5f49cbd96b932ffffffff306fdd1a3368dd99a5798a896ec17bba6b0557c1132cb77442b86ff3718011bc010000006a473044022039a7dca7f8b8dce8111f9957a617ba988ef4543ade4446c77d8f5e2c8827c2d602206d06b7ff1200e05ce405b376594cac5821928359105ab4a8260362f3c21d632f0121030e2e496980bc161953d57ffc904da8c55d25b53052a1a1f4ac6b823a4f534a56ffffffffaf1ad5eb80fe7ae22496e297931f169b7e0a5dc29fc9078922a287be9983e11b000000006b483045022100e7a647fc892aa52bbfa8a0b01a654f82b8355e70d3e28f14aff99ef3847054d402202c1e82327ca8f9091764798403cd36ad8599d804fde65ca1b51c19dcc8f72d86012103c7c3899f1c03f117e9c3fbbd3a0891cc2fdc804c0604177112d2c54d6407ae11ffffffff4d2a4c1d162ffaa59d6083b6847210fc2b210540c513c4672886f05651f7ce47000000006b4830450221009e79344ec91d59939b8eae1d2db459fe55566be57f0e3d223bc2cba7cd5fdaa2022006b996e9364afcaa9893031484dc539c2b83d0b385b6a45bb0604d80783040c80121034422f2a868449aedfe3ac1d7032729b1a1d0c7cd156f44c2b5f2c309860cba28ffffffff1ef5cc0075e1b4594e1fb4526d09095e36e7a045d285f133fd8897b9a25d2728000000006a47304402206bea7ef38fa1dedc832375dffc8bb18ad98c215727b87fc508da16a1cfccb2ec02202eabbbf6fd64239b38293c231cf06c08647151a0d1fb9e22449fc50ef4bd4621012102de240b8023d34c6096673727399f8b69314f7ccfbdaa2da1426176702aec34b4ffffffffa46da09bc472084aa251fce0dc2e5506a71712368e0ecc75491e1ba19b36b47c000000006b483045022100be74ca8f9fa521e89358e88fdbb14491316c3f461c7349a54464a08194b689000220586e4d1e3ad07d512cc655d34c1c59b6effc5f5d0f1a0d5e4ae49f6ed5486d58012102dc8fa34ea4898c8d050347a2d918b3c690a16636e636cc79e0406a9166d022b5ffffffff5a5e10f908c4cd303a659d113bff1cb90a701b7260c7b5259cc674a0f77084ea010000006a4730440220797b27cf2cf4346c15841ce38e4dc2deb10614418465f52463d2b05bce7f1547022074f9aa0bec03a427079c299d04ee64ba18dddeda38c8d4a4067a35cfb6cf39df0121034854700b916fc51b598b3fd0409ce7e611546ada490a954eacd696e785b2e4baffffffff9cf85beccb6b332b4d3a5a71a4f4fa6658ed6235f21405bc467d4a5dcdb8da55000000006b483045022100f4da2376c49ea22408097ce6e8ed4a2357377cc35486bc0ed8ac5e7470f1e656022023bdf7f3c88c6157dcf6a4b96ca6df96718273959840a55222e96a9b888f8e25012102217941f841fa3e339e65856bb62ef3f63826c478101119f8696ac00667432964ffffffff7a360a09207a1bfff80e77fe9c943482378c882ab3bba1ae0131b3d2be897f63010000006b483045022100d39330aed0560b4210ac5a27f8dacf8bf6103425ff5e497f147686b082782d2b022010967edccd2de4e546c94704ea5aef369435fc5beda6b6629d8d962549fc96670121020bffee5ae7926db916586750f1d3410c438a08983151168b91a97f065c780cceffffffff132cef30826cacbbde04fb7b08d836e9b5727223648599f822dd86afd74566bb000000006a47304402205ec55d0f3fb7e0f7583d09c2126741f47da86bdf0e4e4fbd877b4079e5e6a5dd02202663511665a6095c0fe2640d0fd68cdace1e7cf32b0a6cb020779c21c10a93b00121036b62a72f6e06a172a6253ed05fa09007656fd1271f4f759258cce9764570256affffffffecb14a6edaebf544475f300ef8121c7c11da5c6ec22d9f43a68e9cb533a0a9b8000000006b483045022100ff81b2b699dd5d9f0f13d1ada7ea5a2aa6b26df9ac2bc80664ad0e0a26d8fdc0022036192f657a34c026fe442838088410adf56d614f18311f49e44a27d18f3974ea0121033de6038950841bee283f18d4b2e800270cfd10144600804a527028a1c33bc656ffffffffde031bedcb5750e70810a274792e6fbdd734a797a87aa9ffb862d19784f5529c000000006b483045022100a9dae7e14402aab3a21f611d097290e78b2473f2fed70215a350d53df5073b9402204f7d37b8ed2c73751029b996f1950b0b9ad42ca98a101ed1f0ae8404b806ab03012102d8d4d40ba006a524645981fca3fae2feed8624504bedf3d7827b0c7c10f6fc95fffffffff05d4334489f6563f5352a9fe8abd33e8bae90754637648c025dc31ecdf09818000000006a47304402204bbc0fc86a386c43f1e16bccf8ab32c7f7678b14548408b49b8f5747b8fde2a002207a155e0ef08f3e5c82178bd5b64b80f4f1b30cec71aca37b349dec738944c005012102e46c79c5737739cd84cbe359f1d8d140c6076efeff2106684044b560239a1fb2ffffffff9693b9e5dd4e91c3b76f076002199ccbce989a53f7af03e240a36e3229b6cd94000000006a473044022061ab73a15ff2b9dc8eca85514ebddc9c98a2c8e7949ddfc68f39c63b365b53ad02201a2782efed29c5acf0ee1d3faf52a0e9920acdb4fc9cce2d4ee874f8dd45b435012102a829b7f751491b140b784b354dfa077cf64aeac12668af150ca05a5db45ceae1ffffffff02030967657d7d11a7c2c2f434388c83b98f3625695544c8d8ad36028edf6e1b010000006b483045022100f740d19cd13b888a179c22a6231e4f29dcb7a739db4394df644ccc515ac755b80220673543b6e7c2ffb8b088aa28e6c3b7548de010d5680bd02a76e35e7bb53fc85f012103e36abdc5c63581da7b1afda0e82059a586e950f5002b45f603fa66ae2eb29e33ffffffffb8ea9ea8eb94a8f6b4552f816d4ad6bf7973ec49dda93530c9c69621e6eceb09000000006a473044022073468b911fcc63e7bc4f3c9802254e4582e1ea145d459afdb5efb3d5d047a8e402200ecf3163d716b90c917dad12b78614c9f205eb521adacacc96f419a44bbfd80f012102140f4850a4e9d9ffb07047522ba73d3293099183788c944d19827bb3e52d0d66ffffffffa60d8dfdfdd7868092fe1788230d1c15c13e880057bee5677d4a918f0dd95fdd000000006a47304402202953f6bc0b8fbf01a9e0fcb3a5fcccd5a0445ffd686f3374405031bffaf4255802200c7505aedc6eb90d85533af86ca25a44ae4e664c11962babe73c76297bb104df012103a228b5498e469007177d83aa8161f90880eb4287f8a0703fbfb5659ee9b5dda5ffffffff76e59137d514320cc7665aeeb7a563fed7213c7a6856a198e530d703d43f2fdb010000006a47304402206eff4f3ce30b146a5890604b52cd1ebb47139f3f0fc1ccc4ba556a6635083cb102207f7c0cf0d306d86b2fbe877c722cc854624a8b36d52dab6baed017fde41f29300121024207ea77e9785cc137655e9b0ec6256dd03ed7ca891a0f5272373e1fac37b069ffffffff00a7c98db2b3468ae325a0e9a7bab0fd3f21df2d4244fa3aaf6a60770f6ef7c5000000006b483045022100c6c1112c8f17222b7a131d82e6bb79c41758a69e8a397e43605103eefa88c8d00220350a02312ae90ca21c30f92d9e13f0d5ad9045fc544aa2e4197d4d36cb6b6d43012103e6b8b904e576a0660af66ba9e9e34e2a2a5531fb2b78d14ec2364987eaa7259effffffffcb0cb77d7697efa10b396191037067a78da5735c768f1b7986a503ff1a339f2f000000006a473044022032d28d23cc47f82bc13188f68574429f37f022c9d9383fa07cc7a8a6f751a23102205870e287a9303806ab2cab5a90c4d812c73ba9c2609f73d7235b390ba68c56c1012103914ffc59368317ed3a9d0af69bc34af61e2940feaf1270f61748739860945d85ffffffff31c81fa85e36daf1c2bdf13402f77d5d4c2b3379dbbc7b2a0970ac47ac63abb8010000006a47304402200e407935089c1f9e6721d855d3d6f09d987e5c7dcc8be8ac401c8767d4244b14022079337d9c17e88bbd2636439d1e7c71683efc8269c2150f46f22993fd0195f9ef012102d28f92715c7c2bd3faff3ad87a46e5f3b315c7d17bd1aac26935b9c8d678a395fffffffff28a68ddb6b3872c698d1cf5d60e6ad1349eaf069332868c9c7d1c1d4fde8e7c010000006a47304402200148e269b999bd6f901f425273711813087c14c7a5b719da361e7481bb0f9dfa0220127e9cfed4f20324c964edea76046b6d5c1f262299c81b4f824af139209b824d012103beb9b130ed73a20453436ad333a948f06a501e7ee9f5dfa4e252c14d7d1e8442ffffffff7ca72195d89a476fc103846e051472dfa620c40511533d6e4f73984a977e69f1010000006a47304402202739f759c9ac09c8c85e40980608c77975cf485eb4009fce10f251d42f631ab4022051c5febf798f0030cdc03e2c0652663beaedbcafd18cf6db895da5555992defa0121031b9694926cac863966f03f3e32471c5f5a7935a3a3a5c965e18ac199079c1bfeffffffff233920719694df68742303be163d6129d9c7588b15eb6c7f65161aaf073a571f010000006b483045022100b2864f4702ed1d4e583706b5b7d8c6363b7475f976f11363e21ade8e45b50de902206385cf0239891da409ada586fe5f0cc2d2c38ce92016f55673e7bed6c943f43701210202f82ab986b639a1e8412a4744884c8a62979f39be930548ea6649402fdb0c9bffffffff7e23ac7e0ae7354191353a5cf0807e4c25e8d16cada5b30e8ff9af094f721b83010000006b483045022100c0a710f8da3cc55a10b5ce92105ec1fc15d319d4c93e335b66ad2e55cc4569ec0220707d13a65bf9f30192e00f3150ec05fa2d8a3e66bb3d8f67ce23b0254f6626b00121027de626f06d7f04d99db49967009a0b535d26366d41b8341f52aaf8f4b22bc547ffffffff3215e756f9bab6e8c2c9abfc76b7512ba4d618753e5d8cc0c094bfe1500e5833000000006b483045022100ef8b3978158acc3788a6b70c569ec927ab1ebab75462848edcafcc21e49df59b02204d4d0d37d4b1a2de062c2e09331533df27354eaeeaea2a160d067e01bc19bb8601210306c7ccde1fbfab99757d69d9d4e6cd797b5f889ab08d8728dc348301b1d81beaffffffff904afc004fb7d974c9a6790cefc885a7c74908b95af9c806fd456ccf952009d1010000006a473044022076760d8497bb2d4fbadc9069bf8225b2da587003ac4e2347ab50766e9270aaef02201b1d6c4845b0d68988613e72788004d7eb0bd1711b43cbe79cbe98fc9118a8ec012102e2fe2ed59bc35f164b64105121984f87022b1c0475864a634f63b8a0f93314e1ffffffff0150447021000000001976a9148de3d98b5529fa57db9fcd0df2502857282158f888ac00000000"
}

鑑於呼叫signrawtransaction返回 atxid我假設交易已正確簽名和編碼。

您能幫我確定為什麼我的本地設置的測試網路不接受它嗎?

乍一看,十六進制編碼的交易本身看起來不錯。當你發送它時,你會收到錯誤嗎?可能只是您的交易費用為零,請嘗試增加費用(通過減少您唯一輸出的金額)並重試。

引用自:https://bitcoin.stackexchange.com/questions/61349