Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func InitAnchor ¶
func InitAnchor(ldb database.Db, q chan factomwire.FtmInternalMsg, serverKey common.PrivateKey)
InitAnchor inits rpc clients for factom and load up unconfirmed DirBlockInfo from leveldb
func InitRPCClient ¶ added in v0.3.4
func InitRPCClient() error
InitRPCClient is used to create rpc client for btcd and btcwallet and it can be used to test connecting to btcd / btcwallet servers running in different machine.
func SendRawTransactionToBTC ¶
SendRawTransactionToBTC is the main function used to anchor factom dir block hash to bitcoin blockchain
func UpdateDirBlockInfoMap ¶
func UpdateDirBlockInfoMap(dirBlockInfo *common.DirBlockInfo)
UpdateDirBlockInfoMap allows factom processor to update DirBlockInfo when a new Directory Block is saved to db
Types ¶
type AnchorRecord ¶
type AnchorRecord struct { AnchorRecordVer int DBHeight uint32 KeyMR string RecordHeight uint32 Bitcoin struct { Address string //"1HLoD9E4SDFFPDiYfNYnkBLQ85Y51J3Zb1", TXID string //"9b0fc92260312ce44e74ef369f5c66bbb85848f2eddd5a7a1cde251e54ccfdd5", BTC Hash - in reverse byte order BlockHeight int32 //345678, BlockHash string //"00000000000000000cc14eacfc7057300aea87bed6fee904fd8e1c1f3dc008d4", BTC Hash - in reverse byte order Offset int32 //87 } }
AnchorRecord is used to construct anchor chain
Click to show internal directories.
Click to hide internal directories.