mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-08-18 01:43:47 +00:00
mobile: performed gofmt
This commit is contained in:
parent
978346e438
commit
f22a3e9451
3 changed files with 22 additions and 22 deletions
|
|
@ -158,7 +158,7 @@ type NewMessageHandler interface {
|
||||||
func (wc *WhisperClient) SubscribeMessages(ctx *Context, criteria *Criteria, handler NewMessageHandler, buffer int) (*Subscription, error) {
|
func (wc *WhisperClient) SubscribeMessages(ctx *Context, criteria *Criteria, handler NewMessageHandler, buffer int) (*Subscription, error) {
|
||||||
// Subscribe to the event internally
|
// Subscribe to the event internally
|
||||||
ch := make(chan *whisper.Message, buffer)
|
ch := make(chan *whisper.Message, buffer)
|
||||||
rawSub, err := wc.client.SubscribeMessages(ctx.context, *criteria.criteria, ch)
|
rawSub, err := wc.client.SubscribeMessages(ctx.context, *criteria.criteria, ch)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -372,7 +372,7 @@ type NewMessage struct {
|
||||||
newMessage *whisper.NewMessage
|
newMessage *whisper.NewMessage
|
||||||
}
|
}
|
||||||
|
|
||||||
func NewNewMessage() (*NewMessage) {
|
func NewNewMessage() *NewMessage {
|
||||||
nm := &NewMessage{
|
nm := &NewMessage{
|
||||||
newMessage: new(whisper.NewMessage),
|
newMessage: new(whisper.NewMessage),
|
||||||
}
|
}
|
||||||
|
|
@ -403,13 +403,13 @@ type Message struct {
|
||||||
message *whisper.Message
|
message *whisper.Message
|
||||||
}
|
}
|
||||||
|
|
||||||
func (m *Message) GetSig() []byte { return m.message.Sig }
|
func (m *Message) GetSig() []byte { return m.message.Sig }
|
||||||
func (m *Message) GetTTL() int32 { return int32(m.message.TTL) }
|
func (m *Message) GetTTL() int32 { return int32(m.message.TTL) }
|
||||||
func (m *Message) GetTimestamp() int32 { return int32(m.message.Timestamp) }
|
func (m *Message) GetTimestamp() int32 { return int32(m.message.Timestamp) }
|
||||||
func (m *Message) GetPayload() []byte { return m.message.Payload }
|
func (m *Message) GetPayload() []byte { return m.message.Payload }
|
||||||
func (m *Message) GetPoW() float64 { return m.message.PoW }
|
func (m *Message) GetPoW() float64 { return m.message.PoW }
|
||||||
func (m *Message) GetHash() []byte { return m.message.Hash }
|
func (m *Message) GetHash() []byte { return m.message.Hash }
|
||||||
func (m *Message) GetDst() []byte { return m.message.Dst }
|
func (m *Message) GetDst() []byte { return m.message.Dst }
|
||||||
|
|
||||||
// Messages represents an array of messages.
|
// Messages represents an array of messages.
|
||||||
type Messages struct {
|
type Messages struct {
|
||||||
|
|
@ -434,20 +434,20 @@ type Criteria struct {
|
||||||
criteria *whisper.Criteria
|
criteria *whisper.Criteria
|
||||||
}
|
}
|
||||||
|
|
||||||
func NewCriteria(topic []byte) (*Criteria) {
|
func NewCriteria(topic []byte) *Criteria {
|
||||||
c := &Criteria{
|
c := &Criteria{
|
||||||
criteria: new(whisper.Criteria),
|
criteria: new(whisper.Criteria),
|
||||||
}
|
}
|
||||||
encodedTopic := whisper.BytesToTopic(topic)
|
encodedTopic := whisper.BytesToTopic(topic)
|
||||||
c.criteria.Topics = []whisper.TopicType{ encodedTopic }
|
c.criteria.Topics = []whisper.TopicType{encodedTopic}
|
||||||
return c
|
return c
|
||||||
}
|
}
|
||||||
|
|
||||||
func (c *Criteria) GetSymKeyID() string { return c.criteria.SymKeyID }
|
func (c *Criteria) GetSymKeyID() string { return c.criteria.SymKeyID }
|
||||||
func (c *Criteria) SetSymKeyID(symKeyID string) { c.criteria.SymKeyID = symKeyID }
|
func (c *Criteria) SetSymKeyID(symKeyID string) { c.criteria.SymKeyID = symKeyID }
|
||||||
func (c *Criteria) GetPrivateKeyID() string { return c.criteria.PrivateKeyID }
|
func (c *Criteria) GetPrivateKeyID() string { return c.criteria.PrivateKeyID }
|
||||||
func (c *Criteria) SetPrivateKeyID(privateKeyID string) { c.criteria.PrivateKeyID = privateKeyID }
|
func (c *Criteria) SetPrivateKeyID(privateKeyID string) { c.criteria.PrivateKeyID = privateKeyID }
|
||||||
func (c *Criteria) GetSig() []byte { return c.criteria.Sig }
|
func (c *Criteria) GetSig() []byte { return c.criteria.Sig }
|
||||||
func (c *Criteria) SetSig(sig []byte) { c.criteria.Sig = sig }
|
func (c *Criteria) SetSig(sig []byte) { c.criteria.Sig = sig }
|
||||||
func (c *Criteria) GetMinPow() float64 { return c.criteria.MinPow }
|
func (c *Criteria) GetMinPow() float64 { return c.criteria.MinPow }
|
||||||
func (c *Criteria) SetMinPow(pow float64) { c.criteria.MinPow = pow }
|
func (c *Criteria) SetMinPow(pow float64) { c.criteria.MinPow = pow }
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue