non-wallet transaction id ( code 710 ) for an existing transaction using getwallettransaction vs. getrawtransaction

+2 votes
The output for getblock give me the below result and so this block contain 4 transaction :

{
    "hash" : "00964ff493764e24b142b22d1b17d16ed9115bf89ad1f8a3f45eca9864bce683",
    "miner" : "1Bihmhz9qgBmmbVtRGAzMSeqVn7SPBcp4E3B3f",
    "confirmations" : 11,
    "size" : 4112,
    "height" : 3805,
    "version" : 3,
    "merkleroot" : "c6b4ce8c8ee479bea73ed0ca3daaf51e15e86259653ae4cf4270c607a19734a7",
    "tx" : [
        "2d40b89a90114ee39583b37a103854e4a1d506ca69c93006113303004cd22739",
        "9f8bdfef82487baf7b26f05508f48f8c4c5e94bdb979b5861578570db2fa33bf",
        "9b72e86cf9f1cac39233cd055c4b567c9460b4daa7577180a4031125fb1073b8",
        "c1476c77216736d0b6eb65e3a206d3b3a1e36d1f84e6d04d697a721776f2516f"
    ],
    "time" : 1591190766,
    "nonce" : 130,
    "bits" : "2000ffff",
    "difficulty" : 5.96046447753906e-8,
    "chainwork" : "00000000000000000000000000000000000000000000000000000000000ede00",
    "previousblockhash" : "00ba222469f90606818c899b584f1800729673976e366d14354628dbd9c40b46",
    "nextblockhash" : "00b853abe9e679087b0d828b34fd5b669352b4743bad209a81f1b173501a5d79"
}

and the issue is getwallettransaction for one of them (specifically 2d40b89a90114ee39583b37a103854e4a1d506ca69c93006113303004cd22739) give me 710 error code while the others haven't any issue and give me normal result? as per below:

getwallettransaction 2d40b89a90114ee39583b37a103854e4a1d506ca69c93006113303004cd22739

error code: -710
error message:
Invalid or non-wallet transaction id

Notice: getrawtransaction for this transaction gave me normal result as below:

getrawtransaction 2d40b89a90114ee39583b37a103854e4a1d506ca69c93006113303004cd22739

01000000010000000000000000000000000000000000000000000000000000000000000000ffffffff0c02dd0e0101062f503253482fffffffff010000000000000000716a4c6e53504b624630440220755becff7e2b9cac31d702e0c1c965a38f40487eec9096dc61742b3af0bd9db70220227ae6a72d83cf3284311405359f333468632fbe13d8528b97658a36eb2f7715032102006a8c25a8ac1e90cb6a8881e59b8829b400bf45b8f2ee28d3fcb32d15a2c6e800000000
asked Jun 3, 2020 by mina

1 Answer

0 votes

The getwallettransaction command can only retrieve transactions that are actually stored in the wallet, because they involve an address in the wallet, or a subscribed asset or stream. It seems like this transaction was not stored in the wallet of this node.

answered Jun 4, 2020 by MultiChain
...