Skip to content

Commit

Permalink
make data private
Browse files Browse the repository at this point in the history
  • Loading branch information
diegomrsantos committed Apr 6, 2023
1 parent 88f9cff commit 13c7975
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion libp2p/multiaddress.nim
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ type
coder*: Transcoder

MultiAddress* = object
data*: VBuffer
data: VBuffer

MaPatternOp* = enum
Eq, Or, And
Expand Down Expand Up @@ -63,6 +63,10 @@ const
IPPROTO_TCP = Protocol.IPPROTO_TCP
IPPROTO_UDP = Protocol.IPPROTO_UDP

proc data*(ma: MultiAddress): VBuffer =
## Returns the data buffer of the MultiAddress.
return ma.data

proc hash*(a: MultiAddress): Hash =
var h: Hash = 0
h = h !& hash(a.data.buffer)
Expand Down

0 comments on commit 13c7975

Please sign in to comment.