Skip to content

Commit

Permalink
Merge pull request #131 from FactomProject/FD-1247
Browse files Browse the repository at this point in the history
Fd 1247
  • Loading branch information
Emyrk authored Nov 13, 2019
2 parents 865c322 + a1138c7 commit 8f60dd3
Showing 1 changed file with 11 additions and 8 deletions.
19 changes: 11 additions & 8 deletions fblock.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,13 +14,16 @@ import (
// Note: the FBlock api return does not use a "Header" field like the other
// block types do for some reason.
type FBlock struct {
BodyMR string `json:"bodymr"` // Merkle root of the Factoid transactions which accompany this block.
PrevKeyMR string `json:"prevkeymr"` // Key Merkle root of previous block.
PrevLedgerKeyMR string `json:"prevledgerkeymr"` // Sha3 of the previous Factoid Block
ExchRate int64 `json:"exchrate"` // Factoshis per Entry Credit
DBHeight int64 `json:"dbheight"` // Directory Block height

Transactions []Transaction `json:"transactions"`
BodyMR string `json:"bodymr"` // Merkle root of the Factoid transactions which accompany this block.
PrevKeyMR string `json:"prevkeymr"` // Key Merkle root of previous block.
PrevLedgerKeyMR string `json:"prevledgerkeymr"` // Sha3 of the previous Factoid Block
ExchRate int64 `json:"exchrate"` // Factoshis per Entry Credit
DBHeight int64 `json:"dbheight"` // Directory Block height
Transactions []json.RawMessage `json:"transactions"`

ChainID string `json:"chainid,omitempty"`
KeyMR string `json:"keymr,omitempty"`
LedgerKeyMR string `json:"ledgerkeymr,omitempty"`
}

func (f *FBlock) String() string {
Expand All @@ -34,7 +37,7 @@ func (f *FBlock) String() string {

s += fmt.Sprintln("Transactions {")
for _, t := range f.Transactions {
s += fmt.Sprintln(t)
s += fmt.Sprintln(string(t))
}
s += fmt.Sprintln("}")

Expand Down

0 comments on commit 8f60dd3

Please sign in to comment.