public class SpvService extends BaseService
metricsTask| 构造器和说明 |
|---|
SpvService(INetwork network,
TimerTaskManager timerTaskManager,
ClientEnv env) |
| 限定符和类型 | 方法和说明 |
|---|---|
boolean |
init(VerifiedBlock verifiedBlock,
AbstractSpvProxy proxy,
int maxBlockAmount,
int intervalMs)
Init.
|
boolean |
init(VerifiedBlock verifiedBlock,
AbstractSpvProxy proxy,
int maxBlockAmount,
int intervalMs,
BaseFixedSizeByteArray.Fixed20ByteArray myChainId)
Init.
|
boolean |
start(MychainClient client) |
boolean |
stop()
Stop.
|
boolean |
verifyAccount(Account account,
BigInteger blockNum)
Verify account boolean.
|
boolean |
verifyAccount(Account account,
BigInteger blockNum,
BaseFixedSizeByteArray.Fixed20ByteArray myChainId)
Verify account boolean.
|
boolean |
verifyAccount(WorldStateProof proof,
Account account,
BigInteger blockNum) |
boolean |
verifyBlockHeader(VerifiedBlock block,
BlockHeaderInfo info) |
boolean |
verifyContract(Contract contract,
BigInteger blockNum)
Verify contract boolean.
|
boolean |
verifyContract(Contract contract,
BigInteger blockNum,
BaseFixedSizeByteArray.Fixed20ByteArray myChainId)
Verify contract boolean.
|
boolean |
verifyContract(WorldStateProof proof,
Contract contract,
BigInteger blockNum) |
boolean |
verifyReceipt(Hash txHash,
TransactionReceipt receipt)
Verify receipt boolean.
|
boolean |
verifyReceipt(Hash txHash,
TransactionReceipt receipt,
BaseFixedSizeByteArray.Fixed20ByteArray myChainId)
Verify receipt boolean.
|
boolean |
verifyReceipt(ReceiptProof proof,
TransactionReceipt receipt) |
boolean |
verifyTransaction(Hash hash)
Verify transaction boolean.
|
boolean |
verifyTransaction(Hash hash,
BaseFixedSizeByteArray.Fixed20ByteArray myChainId)
Verify transaction boolean.
|
boolean |
verifyTransaction(TransactionProof proof,
Hash txHash) |
void |
watchIdentity(Hash id)
watch identity.
|
void |
watchTopic(String topic)
watch topic.
|
chooseEndpoint, getEnv, getNetwork, queryReceiptAsync, queryReceiptSync, sendAsyncLocalTransaction, sendAsyncLocalTransaction, sendAsyncRequest, sendAsyncRequest, sendAsyncTransaction, sendAsyncTransaction, sendLocalTransaction, sendLocalTransaction, sendSyncRequest, sendSyncRequest, sendSyncTransaction, sendSyncTransaction, signRequest, signRequest, signRequest, signRequestWithZoropublic SpvService(INetwork network, TimerTaskManager timerTaskManager, ClientEnv env)
public boolean start(MychainClient client)
start 在类中 BaseServiceclient - clientpublic boolean stop()
stop 在类中 BaseServicepublic boolean init(VerifiedBlock verifiedBlock, AbstractSpvProxy proxy, int maxBlockAmount, int intervalMs)
verifiedBlock - the verified blockproxy - the proxypublic boolean init(VerifiedBlock verifiedBlock, AbstractSpvProxy proxy, int maxBlockAmount, int intervalMs, BaseFixedSizeByteArray.Fixed20ByteArray myChainId)
verifiedBlock - the verified blockproxy - the proxypublic void watchTopic(String topic)
topic - the topicpublic void watchIdentity(Hash id)
id - the idpublic boolean verifyAccount(Account account, BigInteger blockNum)
account - the accountblockNum - the block numpublic boolean verifyAccount(Account account, BigInteger blockNum, BaseFixedSizeByteArray.Fixed20ByteArray myChainId)
account - the accountblockNum - the block nummyChainId - public boolean verifyContract(Contract contract, BigInteger blockNum)
contract - the contractblockNum - the block numpublic boolean verifyContract(Contract contract, BigInteger blockNum, BaseFixedSizeByteArray.Fixed20ByteArray myChainId)
contract - the contractblockNum - the block nummyChainId - public boolean verifyTransaction(Hash hash)
hash - the identitypublic boolean verifyTransaction(Hash hash, BaseFixedSizeByteArray.Fixed20ByteArray myChainId)
hash - the identitymyChainId - public boolean verifyReceipt(Hash txHash, TransactionReceipt receipt)
receipt - the receiptpublic boolean verifyReceipt(Hash txHash, TransactionReceipt receipt, BaseFixedSizeByteArray.Fixed20ByteArray myChainId)
txHash - receipt - the receiptmyChainId - public boolean verifyAccount(WorldStateProof proof, Account account, BigInteger blockNum)
public boolean verifyContract(WorldStateProof proof, Contract contract, BigInteger blockNum)
public boolean verifyTransaction(TransactionProof proof, Hash txHash)
public boolean verifyReceipt(ReceiptProof proof, TransactionReceipt receipt)
public boolean verifyBlockHeader(VerifiedBlock block, BlockHeaderInfo info)
Copyright © 2022. All rights reserved.