Skip to content

Include nodes with weight 0 when trustThreshold is set to 0 #6

@josephmturner

Description

@josephmturner

Would you be open to including nodes with trust weight 0 in the return value of TrustNet.prototype.getAllTrusted and other methods?

For my particular use-case, changing

return Object.entries(this.rankings).filter((e) => e[1] > 0).map((e) => e[0]).concat(this.rootid)
to return Object.entries(this.rankings).filter((e) => e[1] > 0 || this.trustThreshold === 0).map((e) => e[0]).concat(this.rootid) returned the results I wanted. I'm not sure what other changes would need to made for consistency.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions