I’m pre-reviewing base on this pull request. With 158 file and 188 commits, I think that I need to spend a lot of days to do it . We know that this is a pre-review for multi-view solution coding, not final coding because you guys need to merge portal v2 for a finalized pull request. I will send some reviewing code for 1st fixing:
1/ We can remove case data := <-cm.data here, right?
because this function is no longer used
2/ shardID come from RPC in some case. So I think we need to check index of slice and nil pointer exception
because if RPC is invalid, the node will be crashed
3/ This function always return 0 -> remove it?
and review where we use it
4/ Singleton in beacon pool
We can use blockchainObj as a field in BeaconPool singleton, right? Because any node also needs to get beacon, singleton beacon pool will handle this blockchainObj and shardpool can reuse it
5/ Many interface of server object is no longer used
can we remove all of them?
6/ I think 3 functions are not used, right?
7/ Remove this condition