Open achamely opened 9 years ago
First issue, missing ref address - seems like the showReference bool wasn't added with the case:
case MSC_TYPE_GRANT_PROPERTY_TOKENS:
if (0 == mp_obj.step2_Value())
{
showReference = true;
propertyId = mp_obj.getProperty();
amount = mp_obj.getAmount();
}
break;
case MSC_TYPE_REVOKE_PROPERTY_TOKENS:
if (0 == mp_obj.step2_Value())
{
propertyId = mp_obj.getProperty();
amount = mp_obj.getAmount();
}
break;
Second issue (property ID zero) means that step2_Value is not allowing getProperty() to get the right detail - I didn't write grants/revokes so I'll need to dive into that. Leave it with me :)
Thanks Z
Quick Q - in your mastercore output above, you have:
"fee": 4.5e-05,
Is there some interpretation layer there between what was returned and what you pasted? We shouldn't be passing out fees (from mastercore) formatted like that.
EDIT: I get "fee" : 0.00004500,
for that tx.
Also, ignore my comment above re the missing showReference bool - that's quoting the revoke case - think I'm losing my mind!
Anyway, the actual issue is that there is no CASE for populateRPCTransactionObject whatsoever for the Change Issuer transaction, thus it's left to defaults. I'll add a CASE for this to 0.0.9.1.
That's better :)
zathras@coredev01:~/github/build/mastercore$ src/mastercored gettransaction_MP 0a7a3e6165a5d17be55214a3967834d0537cadb03cf8a840a3e3b6ea315175a1
{
"txid" : "0a7a3e6165a5d17be55214a3967834d0537cadb03cf8a840a3e3b6ea315175a1",
"sendingaddress" : "mfmGJgiyX2W43ykhZzP2DgA782L9vKRGeC",
"referenceaddress" : "n1NZHR8pmp1mQWKxJ7LvgDqLkwT4P6cept",
"ismine" : false,
"confirmations" : 15,
"fee" : 0.00004500,
"blocktime" : 1422917758,
"version" : 0,
"type_int" : 70,
"type" : "Change Issuer Address",
"propertyid" : 2147483674,
"divisible" : true,
"amount" : "0.00000000",
"valid" : true
}
Thanks Z, i'm rebuilding now. Yes in my previous output that was from a python interpreter
@zathras-crypto this is pushed to the 0.0.9 branch i see. Shouldn't it also be pushed to 0.0.10 for consistency?
Yes it should - great spot - thanks :)
The RPC output of a valid TX70 is missing 2 vital pieces of information that would be needed by integrators, The reference address and propertyid being affected by the tx.
Ex:
./mastercored gettransaction_MP 0a7a3e6165a5d17be55214a3967834d0537cadb03cf8a840a3e3b6ea315175a1 { "error": null, "id": null, "result": { "amount": "0.00000000", "blocktime": 1422917758, "confirmations": 1, "divisible": true, "fee": 4.5e-05, "ismine": false, "propertyid": 0, "sendingaddress": "mfmGJgiyX2W43ykhZzP2DgA782L9vKRGeC", "txid": "0a7a3e6165a5d17be55214a3967834d0537cadb03cf8a840a3e3b6ea315175a1", "type": "Change Issuer Address", "type_int": 70, "valid": true, "version": 0 } }
Discovered during Grant/Revoke/Tx70 testing https://docs.google.com/a/mastercoin.org/spreadsheets/d/1_DZ_sO2q9y2E5xmkVrqs2gkMjPER-awf7xV2tDt4U84/edit#gid=0