Check-in [e6a2a65611]
Overview
Comment:Added support for comments in block JSON format
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA3-256: e6a2a65611851b2e1ead851b512fbb01e50dbee5258dda067490ae7e9d361235
User & Date: rkeene on 2018-07-02 23:50:47
Other Links: manifest | tags
Context
2018-07-03
05:32
Added release engineering scripts check-in: 014c8b664b user: rkeene tags: trunk
2018-07-02
23:50
Added support for comments in block JSON format check-in: e6a2a65611 user: rkeene tags: trunk
23:33
Start of work on a Tcl-based random processor -- but for now disable all randomness check-in: 180aff4740 user: rkeene tags: trunk
Changes

Modified nano.tcl from [e1a8e5a90c] to [f244565700].

369
370
371
372
373
374
375
376
377
378
379
380
381
382
383

			set block(link_as_account) [::nano::address::fromPublicKey $block(link) $addressFormatFlag]
		}
	}

	set blockJSONFields {
		type account source destination previous representative balance
		link link_as_account _blockHash _workHash signature
	}

	set blockJSONEntries [lmap field $blockJSONFields {
		if {![info exists block($field)]} {
			continue
		}








|







369
370
371
372
373
374
375
376
377
378
379
380
381
382
383

			set block(link_as_account) [::nano::address::fromPublicKey $block(link) $addressFormatFlag]
		}
	}

	set blockJSONFields {
		type account source destination previous representative balance
		link link_as_account _blockHash _workHash signature _comment
	}

	set blockJSONEntries [lmap field $blockJSONFields {
		if {![info exists block($field)]} {
			continue
		}

554
555
556
557
558
559
560

561
562
563
564
565
566
567
		"type" state \
		"account" $block(from) \
		"previous" $block(previous) \
		"representative" $block(representative) \
		"balance" $block(balance) \
		"link_as_account" $block(to) \
		"_workHash" $block(previous) \

	]

	if {[info exists block(signKey)]} {
		dict set blockDict signKey $block(signKey)
	}

	tailcall ::nano::block::jsonFromDict $blockDict







>







554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
		"type" state \
		"account" $block(from) \
		"previous" $block(previous) \
		"representative" $block(representative) \
		"balance" $block(balance) \
		"link_as_account" $block(to) \
		"_workHash" $block(previous) \
		"_comment" "Send $block(amount) raw from $block(from) to $block(to)" \
	]

	if {[info exists block(signKey)]} {
		dict set blockDict signKey $block(signKey)
	}

	tailcall ::nano::block::jsonFromDict $blockDict
591
592
593
594
595
596
597

598
599
600
601
602
603
604
		"type" state \
		"account" $block(to) \
		"previous" $block(previous) \
		"representative" $block(representative) \
		"balance" $block(balance) \
		"link" $block(sourceBlock) \
		"_workHash" $block(_workHash) \

	]

	if {[info exists block(signKey)]} {
		dict set blockDict signKey $block(signKey)
	}

	tailcall ::nano::block::jsonFromDict $blockDict







>







592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
		"type" state \
		"account" $block(to) \
		"previous" $block(previous) \
		"representative" $block(representative) \
		"balance" $block(balance) \
		"link" $block(sourceBlock) \
		"_workHash" $block(_workHash) \
		"_comment" "Receive $block(amount) raw on $block(to) from hash $block(sourceBlock)" \
	]

	if {[info exists block(signKey)]} {
		dict set blockDict signKey $block(signKey)
	}

	tailcall ::nano::block::jsonFromDict $blockDict