ソースを参照

doc/book: hashchain: change EventNode structure

ghassmo 3 年 前
コミット
d251afd137
1 ファイル変更3 行追加14 行削除
  1. 3 14
      doc/src/misc/hashchain/structures.md

+ 3 - 14
doc/src/misc/hashchain/structures.md

@@ -25,16 +25,16 @@ The `Event` could have many actions according to the underlying data.
 
 
 | Description    | Data Type      		  | Comments                    			 			  |
 | Description    | Data Type      		  | Comments                    			 			  |
 |--------------- | ---------------------- | ----------------------------------------------------- |
 |--------------- | ---------------------- | ----------------------------------------------------- |
-| parent    	 | Option<`EventNode`> 	  | Only current root has this set to None   			  |
+| parent    	 | Option<`EventId`> 	  | Only current root has this set to None   			  |
 | Event     	 | `Event`  			  | The `Event` itself 					       			  |
 | Event     	 | `Event`  			  | The `Event` itself 					       			  |
-| Children     	 | Vec<`EventNode`>  	  | The `Event`s which has parent as this `Event` hash    |
+| Children     	 | Vec<`EventId`>  	      | The `Event`s which has parent as this `Event` hash    |
 
 
 ## Model 
 ## Model 
 
 
 | Description   | Data Type      		  		   | Comments                      |
 | Description   | Data Type      		  		   | Comments                      |
 |-------------- | -------------------------------- | ----------------------------- |
 |-------------- | -------------------------------- | ----------------------------- |
 | current_root  | `EventId` 	  		  		   | The root `Event` for the tree |
 | current_root  | `EventId` 	  		  		   | The root `Event` for the tree |
-| orphans       | Vec<`Event`>  		  		   | Recently added `Event`s 	   |
+| orphans       | HashMap<`EventId`, `Event`>  	   | Recently added `Event`s 	   |
 | event_map     | HashMap<`EventId`, `EventNode`>  | The actual tree  		 	   |
 | event_map     | HashMap<`EventId`, `EventNode`>  | The actual tree  		 	   |
 
 
 ## View 
 ## View 
@@ -94,17 +94,6 @@ roughly in sync.
 |-------------|-------------|------------------------------ |
 |-------------|-------------|------------------------------ |
 | Head	      | `EventId` 	| head id in the longest chain  |
 | Head	      | `EventId` 	| head id in the longest chain  |
 
 
-## Events  
-
-This used in response to `Sync` message, sending all the children 
-in the node correspond to `EventId` in `Sync` message 
-
-| Description | Data Type    | Comments							|
-|-------------|------------- |--------------------------------- |
-| Events	  | Vec<`Event`> | A list of `Event`  			  	|
-| Head  	  | `EventId`	 | The head in the `Sync` message 	|
-
-
 ## Seen<ObjectId>
 ## Seen<ObjectId>
 
 
 This used to prevent receiving duplicate Objects.
 This used to prevent receiving duplicate Objects.