File tree Expand file tree Collapse file tree 1 file changed +5
-3
lines changed
examples/randomness-beacon/model Expand file tree Collapse file tree 1 file changed +5
-3
lines changed Original file line number Diff line number Diff line change @@ -28,7 +28,7 @@ class BeaconValueOp extends MutationOp {
2828
2929 if ( seq !== undefined && vdfResult !== undefined ) {
3030 this . seq = seq ;
31- this . vdfResult = vdfResult ;
31+ this . vdfResult = vdfResult . toUpperCase ( ) ;
3232 }
3333 }
3434
@@ -109,8 +109,10 @@ class BeaconValueOp extends MutationOp {
109109
110110 const steps = ( this . getTarget ( ) as Beacon ) . steps as number ;
111111
112-
113- //TODO: make sure there is no upper/lowercase ambiguity in the vdfResult!
112+ if ( this . vdfResult . toUpperCase ( ) !== this . vdfResult ) {
113+ BeaconValueOp . log . trace ( 'VDF result is not uppercase' ) ;
114+ return false ;
115+ }
114116
115117 const challengeBuffer = Buffer . from ( challenge , 'hex' ) ;
116118 const resultBuffer = Buffer . from ( this . vdfResult , 'hex' ) ;
You can’t perform that action at this time.
0 commit comments