oscoin / oscoin-parity-wasm-prototype

Prototype implemenation of Oscoin ledger on Parity Ethereum Wasm
0 stars 0 forks source link

Implement project listing #64

Closed rockbmb closed 5 years ago

rockbmb commented 5 years ago

This issue is about implementing the ability for a user to query the ledger for the projects they are members of.

The end result should be a new Client method:

impl Client {
...
    fn list_projects(&self, user: AccountId) -> QueryResult<Vec<oscoin_ledger::Project>>
...
}
xla commented 5 years ago

@rockbmb Why does the function take an AccountId?

cloudhead commented 5 years ago

That's how user accounts are identified :relaxed:

cloudhead commented 5 years ago

By the way I don't think it makes sense for this functionality to be implemented in the ledger, based on our recent discussions. This would require a reverse index for every single account.

geigerzaehler commented 5 years ago

I was under the assumption that we want to list all projects. Not only the ones that a user is a member of. Could you confirm @xla?

cloudhead commented 5 years ago

Ah, yes that would make more sense, hence @xla 's question.

xla commented 5 years ago

Exactly, and if not done in the ledger we have to start the conversation where such indexes would live and how we can guarantee availability of them.

cloudhead commented 5 years ago

This stuff will be available in the ledger :+1:

rockbmb commented 5 years ago

I was not watching the repository, which is why I was not notified of this discussion...

cloudhead commented 5 years ago

I was not watching the repository, which is why I was not notified of this discussion...

Shouldn't you get notifications for participating/having created this issue?