811
812
813
814
815
816
817
818
819
820
821
822
823
824
|
}
proc ::nano::block::json::validateWork {blockJSON} {
set blockDict [::nano::block::dict::fromJSON $blockJSON]
tailcall ::nano::block::dict::validateWork $blockDict
}
# send from <account> to <account> previousBalance <balance>
# amount <amount> sourceBlock <sourceBlockHash>
# previous <previousBlockHash> ?representative <representative>?
proc ::nano::block::create::send {args} {
array set block $args
if {![info exists block(representative)]} {
|
>
>
>
>
>
>
>
>
>
>
>
>
>
|
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
|
}
proc ::nano::block::json::validateWork {blockJSON} {
set blockDict [::nano::block::dict::fromJSON $blockJSON]
tailcall ::nano::block::dict::validateWork $blockDict
}
proc ::nano::block::json::filter {blockJSON} {
set blockDict [::nano::block::dict::fromJSON $blockJSON]
set blockDict [dict filter $blockDict script {key _} {
if {[string match "_*" $key]} {
continue
}
return -level 0 true
}]
set blockJSON [::nano::block::json::fromDict $blockDict]
return $blockJSON
}
# send from <account> to <account> previousBalance <balance>
# amount <amount> sourceBlock <sourceBlockHash>
# previous <previousBlockHash> ?representative <representative>?
proc ::nano::block::create::send {args} {
array set block $args
if {![info exists block(representative)]} {
|