validation/validation.js
function(cb){
				deposit.getDepositAddressBySupernodeAddress(conn, objUnit.authors[0].address, function (err,depositAddress){
					if(err)
						 return cb(err + " can not send pow unit");
					if(payload.deposit != depositAddress)
						return cb("pow unit deposit address is invalid expeected :" + depositAddress +" Actual :" + payload.deposit);
					deposit.getBalanceOfDepositContract(conn, depositAddress,objUnit.round_index,  function (err,balance){
						if(err)
							return cb(err);
						depositBalance = balance;
						cb();
					   }); 
				});
			}
function(cb){
				deposit.getDepositAddressBySupernodeAddress(conn, objUnit.authors[0].address, function (err,depositAddress){
					if(err)
						 return cb(err + " can not send pow unit");
					if(payload.deposit != depositAddress)
						return cb("pow unit deposit address is invalid expeected :" + depositAddress +" Actual :" + payload.deposit);
					deposit.getBalanceOfDepositContract(conn, depositAddress,objUnit.round_index,  function (err,balance){
						if(err)
							return cb(err);
						depositBalance = balance;
						cb();
					   }); 
				});
			}
function ( cb ) { deposit . getDepositAddressBySupernodeAddress ( conn , objUnit . authors [ 0 ] . address , function ( err , depositAddress ) { if ( err ) return cb ( err + " can not send pow unit" ) ; if ( payload . deposit != depositAddress ) return cb ( "pow unit deposit address is invalid expeected :" + depositAddress + " Actual :" + payload . deposit ) ; deposit . getBalanceOfDepositContract ( conn , depositAddress , objUnit . round_index , function ( err , balance ) { if ( err ) return cb ( err ) ; depositBalance = balance ; cb ( ) ; } ) ; } ) ; }
check deposit address is valid and balance
check deposit address is valid and balance