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