Skip to content

Commit

Permalink
aw: do not insert when casting data
Browse files Browse the repository at this point in the history
  • Loading branch information
jazg committed Jul 23, 2020
1 parent b6345a8 commit 9993d44
Showing 1 changed file with 0 additions and 2 deletions.
2 changes: 0 additions & 2 deletions aw.go
Original file line number Diff line number Diff line change
Expand Up @@ -135,13 +135,11 @@ func (node *Node) Run(ctx context.Context) {

func (node *Node) Send(ctx context.Context, signatory id.Signatory, dataType uint8, data []byte) {
hash := sha256.Sum256(data)
node.dht.InsertContent(hash, dataType, data)
node.gossiper.Gossip(id.Hash(signatory), hash, dataType)
}

func (node *Node) Broadcast(ctx context.Context, subnet id.Hash, dataType uint8, data []byte) {
hash := sha256.Sum256(data)
node.dht.InsertContent(hash, dataType, data)
node.gossiper.Gossip(subnet, hash, dataType)
}

Expand Down

0 comments on commit 9993d44

Please sign in to comment.