当前位置: 首页>>代码示例>>Java>>正文


Java WalletAppKit.setAutoSave方法代码示例

本文整理汇总了Java中org.bitcoinj.kits.WalletAppKit.setAutoSave方法的典型用法代码示例。如果您正苦于以下问题:Java WalletAppKit.setAutoSave方法的具体用法?Java WalletAppKit.setAutoSave怎么用?Java WalletAppKit.setAutoSave使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在org.bitcoinj.kits.WalletAppKit的用法示例。


在下文中一共展示了WalletAppKit.setAutoSave方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: WalletRunnable

import org.bitcoinj.kits.WalletAppKit; //导入方法依赖的package包/类
public WalletRunnable()
{
    super();

    log.info("Starting wallet.");

    // https://stackoverflow.com/questions/5115339/tomcat-opts-environment-variable-and-system-getenv
    File walletLoc = ServerConfig.BITMESH_TEST ?
        new File("./") :
        new File(System.getenv("persistdir"));

    if(!walletLoc.canRead() || !walletLoc.canWrite())
    {
        log.error("Cannot read or write to wallet location.");
        return;
    }

    // Initialize wallet appkit with params, location and class name
    appKit = new WalletAppKit(MainNetParams.get(), walletLoc, "mainnet");
    appKit.setAutoSave(true);

    testAppKit = new WalletAppKit(TestNet3Params.get(), walletLoc, "testnet");
    testAppKit.setAutoSave(true);
}
 
开发者ID:adonley,项目名称:LockedTransactionServer,代码行数:25,代码来源:WalletRunnable.java

示例2: initKit

import org.bitcoinj.kits.WalletAppKit; //导入方法依赖的package包/类
private WalletAppKit initKit(@Nullable DeterministicSeed seed) {
   //initialize files and stuff here, add our address to the watched ones
   WalletAppKit kit = new WalletAppKit(params, new File("./spv"), fileprefix);
   kit.setAutoSave(true);
   kit.useTor();
   kit.setDiscovery(new DnsDiscovery(params));
   // fresh restore if seed provided
   if (seed != null) {
      kit.restoreWalletFromSeed(seed);
   }
   // startUp WalletAppKit
   kit.startAndWait();
   return kit;
}
 
开发者ID:DanielKrawisz,项目名称:Shufflepuff,代码行数:15,代码来源:BitcoinCrypto.java

示例3: setUp

import org.bitcoinj.kits.WalletAppKit; //导入方法依赖的package包/类
@Before
public void setUp() throws Exception
{
    appKit = new WalletAppKit(TestNet3Params.get(), walletLocation, TransactionServletTest.class.getName().toString());
    appKit.setAutoSave(true);
    appKit.startAsync();
    appKit.awaitRunning();
    appKit.setBlockingStartup(true);
    wallet = appKit.wallet();
    log.info("Wallet Address " + wallet.currentReceiveAddress());
}
 
开发者ID:adonley,项目名称:LockedTransactionServer,代码行数:12,代码来源:TransactionServletTest.java


注:本文中的org.bitcoinj.kits.WalletAppKit.setAutoSave方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。