Skip to content

Commit f660dc9

Browse files
committed
Fix Base58 Test
1 parent 7f994ff commit f660dc9

1 file changed

Lines changed: 6 additions & 0 deletions

File tree

test/Base58.t.sol

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,8 @@ pragma solidity ^0.8.4;
44
import "./utils/SoladyTest.sol";
55
import {Base58} from "../src/utils/Base58.sol";
66
import {LibString} from "../src/utils/LibString.sol";
7+
import {LibBytes} from "../src/utils/LibBytes.sol";
8+
79

810
contract Base58Test is SoladyTest {
911
function testBase58DecodeRevertsIfInvalidCharacter(bytes1 c) public {
@@ -28,6 +30,10 @@ contract Base58Test is SoladyTest {
2830
}
2931

3032
function testBase58EncodeDecode(bytes memory data, uint256 r) public {
33+
if (data.length > 1000) {
34+
LibBytes.truncate(data, 1000);
35+
}
36+
3137
if (r & 0x00f == 0) {
3238
_brutalizeMemory();
3339
}

0 commit comments

Comments
 (0)