[ctr/lua] update state var suffix in trie queries, currently doesn't support numbers (type information should be passed via rpc)
@@ -593,7 +593,10 @@ func (cw *ChainWorker) Receive(context actor.Context) {
contractTrieRoot := contractProof.State.StorageRoot
varId := bytes.NewBufferString("_sv_")
varId.WriteString(msg.VarName)
+ if len(msg.VarIndex) != 0 {
varId.WriteString(msg.VarIndex)
+ varId.WriteString("_s")
+ }
varTrieKey := common.Hasher(varId.Bytes())
varProof, err = cw.sdb.GetStateDB().GetVarAndProof(varTrieKey, contractTrieRoot, msg.Compressed)
if err != nil {
