@@ -80,17 +80,20 @@ func (n *Node) Register(ctx context.Context) error {
8080 return nil
8181 }
8282
83+ gigabytePrices := n .Context ().SanitizedGigabytePrices (ctx )
84+ hourlyPrices := n .Context ().SanitizedHourlyPrices (ctx )
85+
8386 log .Info ("Registering node" ,
84- "gigabyte_price " , n . Context (). GigabytePrices () ,
85- "hourly_price" , n . Context (). HourlyPrices () ,
87+ "gigabyte_prices " , gigabytePrices ,
88+ "hourly_price" , hourlyPrices ,
8689 "remote_addrs" , n .Context ().APIAddrs (),
8790 )
8891
8992 // Prepare a message to register the node.
9093 msg := v3 .NewMsgRegisterNodeRequest (
9194 n .Context ().AccAddr (),
92- n . Context (). GigabytePrices () ,
93- n . Context (). HourlyPrices () ,
95+ gigabytePrices ,
96+ hourlyPrices ,
9497 n .Context ().APIAddrs (),
9598 )
9699
@@ -106,17 +109,20 @@ func (n *Node) Register(ctx context.Context) error {
106109
107110// UpdateDetails updates the node's pricing and address details on the network.
108111func (n * Node ) UpdateDetails (ctx context.Context ) error {
112+ gigabytePrices := n .Context ().SanitizedGigabytePrices (ctx )
113+ hourlyPrices := n .Context ().SanitizedHourlyPrices (ctx )
114+
109115 log .Info ("Updating node details" ,
110- "gigabyte_prices" , n . Context (). GigabytePrices () ,
111- "hourly_prices" , n . Context (). HourlyPrices () ,
116+ "gigabyte_prices" , gigabytePrices ,
117+ "hourly_prices" , hourlyPrices ,
112118 "remote_addrs" , n .Context ().APIAddrs (),
113119 )
114120
115121 // Prepare a message to update the node's details.
116122 msg := v3 .NewMsgUpdateNodeDetailsRequest (
117123 n .Context ().NodeAddr (),
118- n . Context (). GigabytePrices () ,
119- n . Context (). HourlyPrices () ,
124+ gigabytePrices ,
125+ hourlyPrices ,
120126 n .Context ().APIAddrs (),
121127 )
122128
0 commit comments