Example #1
0
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()
}
Example #2
0
File: log.go Project: robcat/ripple
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()
}
Example #3
0
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())
}
Example #4
0
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)))
}
Example #5
0
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)
}