rchain-community / rchain-api

An API for rchain dapps to communicate with the blockchain
Other
22 stars 12 forks source link

convenience function: createBlockIfPossible #35

Open JoshOrndorff opened 5 years ago

JoshOrndorff commented 5 years ago

The promise returned by createBlock rejects if there are no new deploys. This is consistent with the node's own behavior and shouldn't be changed.

But it is inconvenient because it prevents calling create block after a list of deploys are made because of the possibility that the list of deploys is empty.

I'd like to add a convenience method that behaves the same as createBlock but still resolves if there are no deploys.