200
201
202
203
204
205
206
207
208
209
210
211
212
213
|
if {$blockSignature ne $blockSignature_expected} {
puts "\[3.FAIL\] Got: $blockSignature"
puts "\[3.FAIL\] Exp: $blockSignature_expected"
return false
}
return true
}
set tests {
selftest
signatures
|
>
>
>
>
>
>
>
>
>
|
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
|
if {$blockSignature ne $blockSignature_expected} {
puts "\[3.FAIL\] Got: $blockSignature"
puts "\[3.FAIL\] Exp: $blockSignature_expected"
return false
}
# Verifying a block
set signature [::nano::block::signBlockJSON $block $key -hex]
set verify [::nano::block::verifyBlockJSON $block $signature [::nano::key::publicKeyFromPrivateKey $key]]
if {!$verify} {
puts "\[4.FAIL\] Got: $verify"
puts "\[4.FAIL\] Exp: true"
return false
}
return true
}
set tests {
selftest
signatures
|