File tree Expand file tree Collapse file tree 1 file changed +4
-0
lines changed Expand file tree Collapse file tree 1 file changed +4
-0
lines changed Original file line number Diff line number Diff line change @@ -1120,6 +1120,7 @@ describe(`Psbt`, () => {
1120
1120
assert . deepStrictEqual ( treeFromList , originalTree ) ;
1121
1121
} ) ;
1122
1122
} ) ;
1123
+
1123
1124
it ( 'Throws if too many leaves on a given level' , ( ) => {
1124
1125
const list = Array . from ( { length : 5 } ) . map ( ( ) => ( {
1125
1126
depth : 2 ,
@@ -1130,6 +1131,7 @@ describe(`Psbt`, () => {
1130
1131
tapTreeFromList ( list ) ;
1131
1132
} , new RegExp ( 'No room left to insert tapleaf in tree' ) ) ;
1132
1133
} ) ;
1134
+
1133
1135
it ( 'Throws if taptree depth is exceeded' , ( ) => {
1134
1136
let tree : Taptree = [
1135
1137
{ output : Buffer . from ( [ ] ) } ,
@@ -1142,6 +1144,7 @@ describe(`Psbt`, () => {
1142
1144
tapTreeToList ( tree as Taptree ) ;
1143
1145
} , new RegExp ( 'Max taptree depth exceeded.' ) ) ;
1144
1146
} ) ;
1147
+
1145
1148
it ( 'Throws if tapleaf depth is to high' , ( ) => {
1146
1149
const list = [
1147
1150
{
@@ -1154,6 +1157,7 @@ describe(`Psbt`, () => {
1154
1157
tapTreeFromList ( list ) ;
1155
1158
} , new RegExp ( 'Max taptree depth exceeded.' ) ) ;
1156
1159
} ) ;
1160
+
1157
1161
it ( 'Throws if not a valid taptree structure' , ( ) => {
1158
1162
const tree = Array . from ( { length : 3 } ) . map ( ( ) => ( {
1159
1163
output : Buffer . from ( [ ] ) ,
You can’t perform that action at this time.
0 commit comments