Skip to content
This repository has been archived by the owner on Nov 15, 2021. It is now read-only.

Feature debug storage #120

Merged
merged 3 commits into from
Dec 17, 2017
Merged

Feature debug storage #120

merged 3 commits into from
Dec 17, 2017

Conversation

localhuman
Copy link
Collaborator

Added debug storage for building and testing contracts that aren't deployed yet

When building and testing smart contracts from the prompt, it is often difficult to determine how a contract will act with differing states of storage. Currently, the only way to test persisted storage is to actually deploy an SC on a test network.

This change-set sets up a test LevelDB instance specifically for storing items persisted via the Storage.Put methods within build ../path/file.py test ... contract invocations, so subsequent calls to build .. test ... will be able to access storage items previously placed there.

This PR also adds a few things to the prompt interface:

  • debugstorage on turn debug storage on
  • debugstorage off turn debug storage off
  • debugstorage reset resets the debug storage database

This PR also adds a property in neo.Settings.settings instances: USE_DEBUG_STORAGE which defaults to the value in your protocol.xxx.json

@coveralls
Copy link

Coverage Status

Coverage decreased (-0.06%) to 68.256% when pulling 3138839 on feature-debug-storage into 8c13da7 on development.

@localhuman localhuman merged commit ef76d23 into development Dec 17, 2017
@localhuman localhuman deleted the feature-debug-storage branch December 17, 2017 18:12
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants