Commit b8e18edf authored by Annie Ke's avatar Annie Ke Committed by Kelvin Fichter

Switch removed byte type to bytes1

Breaking change in v0.8.0
parent 8bfa3bcd
......@@ -150,7 +150,7 @@ library Lib_RLPWriter {
if (_len < 56) {
encoded = new bytes(1);
encoded[0] = byte(uint8(_len) + uint8(_offset));
encoded[0] = bytes1(uint8(_len) + uint8(_offset));
} else {
uint256 lenLen;
uint256 i = 1;
......@@ -160,9 +160,9 @@ library Lib_RLPWriter {
}
encoded = new bytes(lenLen + 1);
encoded[0] = byte(uint8(lenLen) + uint8(_offset) + 55);
encoded[0] = bytes1(uint8(lenLen) + uint8(_offset) + 55);
for(i = 1; i <= lenLen; i++) {
encoded[i] = byte(uint8((_len / (256**(lenLen-i))) % 256));
encoded[i] = bytes1(uint8((_len / (256**(lenLen-i))) % 256));
}
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment