func (m *TMProposeSet) Log() string { buf := new(bytes.Buffer) closeTime := data.NewRippleTime(m.GetCloseTime()) fmt.Fprintf(buf, "Proposal: %d Closed: %s Hash: %s ", m.GetProposeSeq(), closeTime.Short(), short(b2h(m.GetCurrentTxHash()))) fmt.Fprintf(buf, "Sig: %s ", short(b2h(m.GetSignature()))) for _, tx := range m.GetAddedTransactions() { fmt.Fprintf(buf, "\nAdded: %s", short(b2h(tx))) } for _, tx := range m.GetRemovedTransactions() { fmt.Fprintf(buf, "\nRemoved: %s", short(b2h(tx))) } return buf.String() }
func (m *ProposeSet) Log() string { buf := new(bytes.Buffer) closeTime := data.NewRippleTime(m.GetCloseTime()) fmt.Fprintf(buf, "Proposal: %d Closed: %s Hash: %s ", m.GetProposeSeq(), closeTime.Short(), short(b2h(m.GetCurrentTxHash()))) fmt.Fprintf(buf, "Sig: %s ", short(b2h(m.Signature.Serialize()))) fmt.Fprintf(buf, "Node: %v ", short(m.NodePublic.ToJSON())) // fmt.Fprintf(buf, "Checked: %t", m.GetCheckedSignature()) for _, tx := range m.GetAddedTransactions() { fmt.Fprintf(buf, "\nAdded: %s", short(b2h(tx))) } for _, tx := range m.GetRemovedTransactions() { fmt.Fprintf(buf, "\nRemoved: %s", short(b2h(tx))) } return buf.String() }
func (m *TMStatusChange) Log() string { t := data.NewRippleTime(uint32(m.GetNetworkTime())) return fmt.Sprintf("Status: %s Event: %s Seq: %d (%d-%d) Time: %s", m.GetNewStatus(), m.GetNewEvent(), m.GetLedgerSeq(), m.GetFirstSeq(), m.GetLastSeq(), t.Short()) }
func (m *TMTransaction) Log() string { received := data.NewRippleTime(uint32(m.GetReceiveTimestamp())) return fmt.Sprintf("Transaction: Status: %s Checked: %t Received: %s Raw:%s", m.GetStatus(), m.GetCheckedSignature(), received.String(), short(b2h(m.RawTransaction))) }
func (m *Ping) Log() string { netTime, pingTime := data.NewRippleTime(uint32(m.GetNetTime())), data.NewRippleTime(uint32(m.GetPingTime())) return fmt.Sprintf("Ping: %s Seq: %d Time: %s/%s ", m.GetType(), m.GetSeq(), netTime, pingTime) }