本文整理了Java中org.bitcoinj.wallet.Wallet.maybeQueueOnWalletChanged()
方法的一些代码示例,展示了Wallet.maybeQueueOnWalletChanged()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Wallet.maybeQueueOnWalletChanged()
方法的具体详情如下:
包路径:org.bitcoinj.wallet.Wallet
类名称:Wallet
方法名:maybeQueueOnWalletChanged
暂无
代码示例来源:origin: greenaddress/GreenBits
/**
* Prepares the wallet for a blockchain replay. Removes all transactions (as they would get in the way of the
* replay) and makes the wallet think it has never seen a block. {@link WalletEventListener#onWalletChanged} will
* be fired.
*/
public void reset() {
lock.lock();
try {
clearTransactions();
lastBlockSeenHash = null;
lastBlockSeenHeight = -1; // Magic value for 'never'.
lastBlockSeenTimeSecs = 0;
saveLater();
maybeQueueOnWalletChanged();
} finally {
lock.unlock();
}
}
代码示例来源:origin: cash.bitcoinj/bitcoinj-core
/**
* Prepares the wallet for a blockchain replay. Removes all transactions (as they would get in the way of the
* replay) and makes the wallet think it has never seen a block. {@link WalletEventListener#onWalletChanged} will
* be fired.
*/
public void reset() {
lock.lock();
try {
clearTransactions();
lastBlockSeenHash = null;
lastBlockSeenHeight = -1; // Magic value for 'never'.
lastBlockSeenTimeSecs = 0;
saveLater();
maybeQueueOnWalletChanged();
} finally {
lock.unlock();
}
}
代码示例来源:origin: fr.acinq/bitcoinj-core
/**
* Prepares the wallet for a blockchain replay. Removes all transactions (as they would get in the way of the
* replay) and makes the wallet think it has never seen a block. {@link WalletEventListener#onWalletChanged} will
* be fired.
*/
public void reset() {
lock.lock();
try {
clearTransactions();
lastBlockSeenHash = null;
lastBlockSeenHeight = -1; // Magic value for 'never'.
lastBlockSeenTimeSecs = 0;
saveLater();
maybeQueueOnWalletChanged();
} finally {
lock.unlock();
}
}
代码示例来源:origin: HashEngineering/dashj
/**
* Prepares the wallet for a blockchain replay. Removes all transactions (as they would get in the way of the
* replay) and makes the wallet think it has never seen a block. {@link WalletEventListener#onWalletChanged} will
* be fired.
*/
public void reset() {
lock.lock();
try {
clearTransactions();
lastBlockSeenHash = null;
lastBlockSeenHeight = -1; // Magic value for 'never'.
lastBlockSeenTimeSecs = 0;
saveLater();
maybeQueueOnWalletChanged();
} finally {
lock.unlock();
}
}
代码示例来源:origin: fr.acinq/bitcoinj-core
@Override
public void onConfidenceChanged(TransactionConfidence confidence, TransactionConfidence.Listener.ChangeReason reason) {
// This will run on the user code thread so we shouldn't do anything too complicated here.
// We only want to queue a wallet changed event and auto-save if the number of peers announcing
// the transaction has changed, as that confidence change is made by the networking code which
// doesn't necessarily know at that point which wallets contain which transactions, so it's up
// to us to listen for that. Other types of confidence changes (type, etc) are triggered by us,
// so we'll queue up a wallet change event in other parts of the code.
if (reason == ChangeReason.SEEN_PEERS) {
lock.lock();
try {
checkBalanceFuturesLocked(null);
Transaction tx = getTransaction(confidence.getTransactionHash());
queueOnTransactionConfidenceChanged(tx);
maybeQueueOnWalletChanged();
} finally {
lock.unlock();
}
}
}
};
代码示例来源:origin: greenaddress/GreenBits
@Override
public void onConfidenceChanged(TransactionConfidence confidence, TransactionConfidence.Listener.ChangeReason reason) {
// This will run on the user code thread so we shouldn't do anything too complicated here.
// We only want to queue a wallet changed event and auto-save if the number of peers announcing
// the transaction has changed, as that confidence change is made by the networking code which
// doesn't necessarily know at that point which wallets contain which transactions, so it's up
// to us to listen for that. Other types of confidence changes (type, etc) are triggered by us,
// so we'll queue up a wallet change event in other parts of the code.
if (reason == ChangeReason.SEEN_PEERS) {
lock.lock();
try {
checkBalanceFuturesLocked(null);
Transaction tx = getTransaction(confidence.getTransactionHash());
queueOnTransactionConfidenceChanged(tx);
maybeQueueOnWalletChanged();
} finally {
lock.unlock();
}
}
}
};
代码示例来源:origin: cash.bitcoinj/bitcoinj-core
@Override
public void onConfidenceChanged(TransactionConfidence confidence, TransactionConfidence.Listener.ChangeReason reason) {
// This will run on the user code thread so we shouldn't do anything too complicated here.
// We only want to queue a wallet changed event and auto-save if the number of peers announcing
// the transaction has changed, as that confidence change is made by the networking code which
// doesn't necessarily know at that point which wallets contain which transactions, so it's up
// to us to listen for that. Other types of confidence changes (type, etc) are triggered by us,
// so we'll queue up a wallet change event in other parts of the code.
if (reason == ChangeReason.SEEN_PEERS) {
lock.lock();
try {
checkBalanceFuturesLocked(null);
Transaction tx = getTransaction(confidence.getTransactionHash());
queueOnTransactionConfidenceChanged(tx);
maybeQueueOnWalletChanged();
} finally {
lock.unlock();
}
}
}
};
代码示例来源:origin: HashEngineering/dashj
@Override
public void onConfidenceChanged(TransactionConfidence confidence, TransactionConfidence.Listener.ChangeReason reason) {
// This will run on the user code thread so we shouldn't do anything too complicated here.
// We only want to queue a wallet changed event and auto-save if the number of peers announcing
// the transaction has changed, as that confidence change is made by the networking code which
// doesn't necessarily know at that point which wallets contain which transactions, so it's up
// to us to listen for that. Other types of confidence changes (type, etc) are triggered by us,
// so we'll queue up a wallet change event in other parts of the code.
if (reason == ChangeReason.SEEN_PEERS) {
lock.lock();
try {
checkBalanceFuturesLocked(null);
Transaction tx = getTransaction(confidence.getTransactionHash());
queueOnTransactionConfidenceChanged(tx);
maybeQueueOnWalletChanged();
} finally {
lock.unlock();
}
} else if(reason == ChangeReason.IX_TYPE &&
confidence.getIXType() == TransactionConfidence.IXType.IX_LOCKED) {
//save the wallet when an InstantSend transaction is locked
saveLater();
}
}
};
代码示例来源:origin: cash.bitcoinj/bitcoinj-core
maybeQueueOnWalletChanged();
代码示例来源:origin: fr.acinq/bitcoinj-core
maybeQueueOnWalletChanged();
代码示例来源:origin: greenaddress/GreenBits
maybeQueueOnWalletChanged();
代码示例来源:origin: HashEngineering/dashj
maybeQueueOnWalletChanged();
代码示例来源:origin: greenaddress/GreenBits
queueOnCoinsSent(tx, balance, newBalance);
maybeQueueOnWalletChanged();
} catch (ScriptException e) {
代码示例来源:origin: cash.bitcoinj/bitcoinj-core
queueOnCoinsSent(tx, balance, newBalance);
maybeQueueOnWalletChanged();
} catch (ScriptException e) {
代码示例来源:origin: fr.acinq/bitcoinj-core
queueOnCoinsSent(tx, balance, newBalance);
maybeQueueOnWalletChanged();
} catch (ScriptException e) {
代码示例来源:origin: fr.acinq/bitcoinj-core
maybeQueueOnWalletChanged();
代码示例来源:origin: greenaddress/GreenBits
maybeQueueOnWalletChanged();
代码示例来源:origin: cash.bitcoinj/bitcoinj-core
maybeQueueOnWalletChanged();
代码示例来源:origin: HashEngineering/dashj
maybeQueueOnWalletChanged();
代码示例来源:origin: HashEngineering/dashj
queueOnCoinsSent(tx, balance, newBalance);
maybeQueueOnWalletChanged();
} catch (ScriptException e) {
内容来源于网络,如有侵权,请联系作者删除!