StringIndented returns an indented string representation of the header.
(indent string)
| 476 | |
| 477 | // StringIndented returns an indented string representation of the header. |
| 478 | func (h *Header) StringIndented(indent string) string { |
| 479 | if h == nil { |
| 480 | return "nil-Header" |
| 481 | } |
| 482 | return fmt.Sprintf(`Header{ |
| 483 | %s Version: %v |
| 484 | %s ChainID: %v |
| 485 | %s Height: %v |
| 486 | %s Time: %v |
| 487 | %s LastBlockID: %v |
| 488 | %s LastCommit: %v |
| 489 | %s Data: %v |
| 490 | %s Validators: %v |
| 491 | %s NextValidators: %v |
| 492 | %s App: %v |
| 493 | %s Consensus: %v |
| 494 | %s Results: %v |
| 495 | %s Evidence: %v |
| 496 | %s Proposer: %v |
| 497 | %s}#%v`, |
| 498 | indent, h.Version, |
| 499 | indent, h.ChainID, |
| 500 | indent, h.Height, |
| 501 | indent, h.Time, |
| 502 | indent, h.LastBlockID, |
| 503 | indent, h.LastCommitHash, |
| 504 | indent, h.DataHash, |
| 505 | indent, h.ValidatorsHash, |
| 506 | indent, h.NextValidatorsHash, |
| 507 | indent, h.AppHash, |
| 508 | indent, h.ConsensusHash, |
| 509 | indent, h.LastResultsHash, |
| 510 | indent, h.EvidenceHash, |
| 511 | indent, h.ProposerAddress, |
| 512 | indent, h.Hash()) |
| 513 | } |
| 514 | |
| 515 | // ToProto converts Header to protobuf |
| 516 | func (h *Header) ToProto() *tmproto.Header { |