Require 100 coins to create a dice plan

This commit is contained in:
jl777 2018-08-23 05:22:21 -11:00
parent 1c75341741
commit dcdb45372d

View File

@ -866,6 +866,12 @@ std::string DiceCreateFunding(uint64_t txfee,char *planstr,int64_t funds,int64_t
fprintf(stderr,"%s\n", CCerror.c_str() ); fprintf(stderr,"%s\n", CCerror.c_str() );
return(""); return("");
} }
if ( funds < 100*COIN )
{
CCerror = "dice plan needs at least 100 coins";
fprintf(stderr,"%s\n", CCerror.c_str() );
return("");
}
memset(&zero,0,sizeof(zero)); memset(&zero,0,sizeof(zero));
if ( (cp= Diceinit(fundingPubKey,zero,&C,planstr,txfee,mypk,dicepk,sbits,a,b,c,d)) == 0 ) if ( (cp= Diceinit(fundingPubKey,zero,&C,planstr,txfee,mypk,dicepk,sbits,a,b,c,d)) == 0 )
{ {