Transaction notes now stored individually per row.

This commit is contained in:
Jose Coll
2016-11-17 17:57:07 +00:00
4 changed files with 24 additions and 26 deletions

View File

@ -38,8 +38,7 @@ val DEFAULT_SESSION_ID = 0L
* Active means they haven't been consumed yet (or we don't know about it).
* Relevant means they contain at least one of our pubkeys.
*/
class Vault(val states: Iterable<StateAndRef<ContractState>>,
val transactionNotes: Map<SecureHash, Set<String>> = emptyMap()) {
class Vault(val states: Iterable<StateAndRef<ContractState>>) {
@Suppress("UNCHECKED_CAST")
inline fun <reified T : ContractState> statesOfType() = states.filter { it.state.data is T } as List<StateAndRef<T>>