rchain / rchain

Blockchain (smart contract) platform using CBC-Casper proof of stake + Rholang for concurrent execution.
Other
693 stars 217 forks source link

Implement traverse method in rholang treeHashMap which returns all the keys and values #3432

Closed zsluedem closed 2 years ago

zsluedem commented 3 years ago

Overview

Currently the holang treeHashMap got set, contains, get, fastUnsafeGet, update for basic operation in treeHashMap.

We still need a method which return all the key values from the map.

Currently we got a scala implementation for doing that but we'd better also got something like this in rholang which dapp developer can benefit.

Impact

Because the speed of rholang execution is slow, this method should take very long and consume a lot of resource on it.

Dependencies

No

Design

The design can borrow the idea from scala version

zsluedem commented 2 years ago

Close it.