ethereum - ganache 在哪里存储以太坊区 block 链

标签 ethereum truffle ganache

我实际上正在使用 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/

相关文章:

ethereum - 为什么无法从任何来源找到契约(Contract)的工件

ethereum - 无法更新可靠性测试区 block 链中的状态

ethereum - 调用其余 API (/storeraw ) 时出现 Tessera 跨域问题

swift - 如何将以太坊智能合约与 iOS 应用连接

javascript - 松露毛毛雨错误 "TypeError: Cannot read property ' 地址'未定义”

javascript - 未捕获的 ReferenceError : web3 is not defined at window. onload

python - Web3py send_raw_transaction ValueError : {'message' : 'invalid remainder' , 'code' : -32000}

ethereum - Solidity智能合约部署时出错: Uncaught Error: Callback was already called

字符串连接是否牢固?

ethereum - 验证使用 Truffle 部署的智能合约代码