File tree Expand file tree Collapse file tree 1 file changed +1
-35
lines changed Expand file tree Collapse file tree 1 file changed +1
-35
lines changed Original file line number Diff line number Diff line change @@ -82,41 +82,7 @@ class Blockchain {
82
82
}
83
83
84
84
validateBlock ( block ) {
85
- if ( this . blocks [ block . hashString ( ) ] ) {
86
- return false ;
87
- }
88
-
89
- if ( block . isGenesis ) {
90
- return true ;
91
- }
92
-
93
- if ( ! block . isGenesis && block . previous === NULL_PUBLIC_KEY ) {
94
- return false ;
95
- }
96
-
97
- if ( block . previous !== NULL_PUBLIC_KEY ) {
98
- if ( ! this . blocks [ block . previous ] ) {
99
- return false ;
100
- }
101
-
102
- if ( this . blocks [ block . previous ] . height < this . getTipBlock ( ) . height - 6 ) {
103
- return false ;
104
- }
105
- }
106
-
107
- if ( block . nonce < 0x0 ) {
108
- return false ;
109
- }
110
-
111
- for ( const transaction of block . transactions ) {
112
- if ( ! block . isGenesis && transaction . source === NULL_PUBLIC_KEY ) {
113
- return false ;
114
- }
115
-
116
- if ( ! this . validateTransaction ( transaction ) ) {
117
- return false ;
118
- }
119
- }
85
+ // TODO
120
86
121
87
return true ;
122
88
}
You can’t perform that action at this time.
0 commit comments