eos icon indicating copy to clipboard operation
eos copied to clipboard

The different result when I change the order of the properties of my struct

Open Phoenix117 opened this issue 8 years ago • 1 comments

case 1: struct datastruct { uint64_t id; time tradetime; account_name from; account_name to; string data; asset cost; string mem; uint64_t primary_key()const { return id; } account_name get_to()const { return to; } }; abi result 1: { "name": "datatable", "index_type": "i64", "key_names": [ "id" ], "key_types": [ "uint64" ], "type": "datastruct" }

case 2: struct datastruct { uint64_t id; account_name from; account_name to; string data; asset cost; string mem; time tradetime; uint64_t primary_key()const { return id; } account_name get_to()const { return to; } }; abi result 2: { "name": "datatable", "index_type": "i64i64i64", "key_names": [ "id", "from", "to" ], "key_types": [ "uint64", "account_name", "account_name" ], "type": "datastruct" }

I just changed the order of the properties, but the 'index_type' and 'key_names' have changed. Does anyone know why?

Phoenix117 avatar May 10 '18 07:05 Phoenix117

I checked this on the latest version, it doesn't behave as mentioned in this ticket anymore.

andriantolie avatar Jul 19 '18 09:07 andriantolie