Consolidate blockScore/unblockScore according to SetBlock() behavior change
@@ -483,7 +483,7 @@ func (s *chainScore) Ex_blockScore(address module.Address) error {
return err
}
as := s.cc.GetAccountState(address.ID())
- if as.IsBlocked() == false {
+ if as.IsBlocked() == false && as.IsContract() {
as.SetBlock(true)
// add to blocked score list
sas := s.cc.GetAccountState(state.SystemID)
@@ -506,7 +506,7 @@ func (s *chainScore) Ex_unblockScore(address module.Address) error {
return err
}
as := s.cc.GetAccountState(address.ID())
- if as.IsBlocked() == true {
+ if as.IsBlocked() == true && as.IsContract() {
as.SetBlock(false)
// remove from blocked score list
sas := s.cc.GetAccountState(state.SystemID)
