Cannot put state in query context
问题 Im trying to use a ticker in my chaincode to update the chaincode state periodically, based on some condition: func (t *SimpleChaincode) Invoke(stub *shim.ChaincodeStub, function string, args []string) ([]byte, error) { ticker := time.NewTicker(time.Millisecond * 10000) go func() { for t := range ticker.C { fmt.Println("Tick at", t) a = a+5 err:= stub.PutState("a", []byte(strconv.Itoa(a))) fmt.Println(err.Error()) } }() return nil, nil } I am sending the invoke transaction using the chaincode