anchor

package
v0.3.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 20, 2015 License: MIT Imports: 22 Imported by: 2

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 SendRawTransactionToBTC

func SendRawTransactionToBTC(hash *common.Hash, blockHeight uint32) (*wire.ShaHash, error)

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

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL