omnilaboratory / obd

OmniBOLT daemon, a golang implementation of OmniBOLT spec, the smart assets lightning network.
MIT License
213 stars 21 forks source link

[Tracker] Incorrect keys in retrieving Node information from storm db #11

Closed johng closed 4 years ago

johng commented 4 years ago
        info := &dao.ObdNodeInfo{}
    err := db.Select(q.Eq("p2p_address", p2pAddress), q.Eq("is_online", true)).First(info)
    if err != nil {
        context.JSON(http.StatusInternalServerError, gin.H{
            "msg": "error p2pAddress",
        })
        return
    }

The following segment always fails with an unknown field error. Replacing the columns with their actual names fixed e.g P2pAddress fixed the issue. An alternative approach would be updating the schema in storm.

iamgamelover commented 4 years ago

Fixed at the commit: aa75572a2bd1d8fbda14b10b2d4f67d48a95df90. Thank you @johng