Skip to content

Commit cc03f1a

Browse files
committed
fix bug
1 parent 8144ed0 commit cc03f1a

File tree

1 file changed

+9
-9
lines changed

1 file changed

+9
-9
lines changed

runtime/src/precompiles/neuron.rs

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -144,10 +144,10 @@ impl NeuronPrecompile {
144144
port_vec.copy_from_slice(get_slice(data, 126, 128)?);
145145
let port = u16::from_be_bytes(port_vec);
146146

147-
let ip_type = data[160];
148-
let protocol = data[192];
149-
let placeholder1 = data[224];
150-
let placeholder2 = data[256];
147+
let ip_type = data[159];
148+
let protocol = data[191];
149+
let placeholder1 = data[223];
150+
let placeholder2 = data[255];
151151
Ok((
152152
netuid,
153153
version,
@@ -184,10 +184,10 @@ impl NeuronPrecompile {
184184
port_vec.copy_from_slice(get_slice(data, 126, 128)?);
185185
let port = u16::from_be_bytes(port_vec);
186186

187-
let ip_type = data[160];
188-
let protocol = data[192];
189-
let placeholder1 = data[224];
190-
let placeholder2 = data[256];
187+
let ip_type = data[159];
188+
let protocol = data[191];
189+
let placeholder1 = data[223];
190+
let placeholder2 = data[255];
191191
Ok((
192192
netuid,
193193
version,
@@ -225,7 +225,7 @@ impl NeuronPrecompile {
225225
port_vec.copy_from_slice(get_slice(data, 126, 128)?);
226226
let port = u16::from_be_bytes(port_vec);
227227

228-
let ip_type = data[160];
228+
let ip_type = data[159];
229229
Ok((netuid, version, ip, port, ip_type))
230230
}
231231
}

0 commit comments

Comments
 (0)