我实际上正在使用 truffle 和 Ganache 来进行一些开发。
我想知道 Ganache 将其区 block 链存储在哪里,以查看我的测试使用了多少数据。它是否存储在电脑上可访问的位置?
我正在使用
- Ubuntu 17.10 64 位
- ganache-1.0.1-x86_64
最佳答案
TestRPC 过去只存在于内存中。他们最近才发布了对将区 block 链写入文件系统的支持。据我所知,内存中实现仍然是默认行为。如果您想查找区 block 链文件,您可以使用 --db
选项自行指定位置。
来自他们的release page (v4.0.0以下):
Because we backed the TestRPC via the filesystem, this means you can now save your blockchain's data for later use. That's right, if you close the TestRPC and reopen it later, say, you can start up right where you left off. You'll need to use the new --db option (see the README) to tell the TestRPC where you'd like the data saved. You'll also likely want to use the --mnemonic option to use the same accounts each time.
关于ethereum - ganache 在哪里存储以太坊区 block 链,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/48097178/