Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 10 additions & 10 deletions src/gui-experimental/UFRMPascalCoinWalletConfig.pas
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ procedure TFRMPascalCoinWalletConfig.bbOkClick(Sender: TObject);
i := PtrInt(cbPrivateKeyToMine.Items.Objects[cbPrivateKeyToMine.ItemIndex]);
if (i<0) Or (i>=TWallet.Keys.Count) then raise Exception.Create('Invalid private key');
if NOT TWallet.Keys.Key[i].HasPrivateKey then raise Exception.Create('Cannot use key "' + TWallet.Keys.Key[i].Name + '" for mining since it is watch-only');
TSettings.MinerSelectedPrivateKey := TAccountComp.AccountKey2RawString(TWallet.Keys.Key[i].AccountKey);
TSettings.MinerSelectedPublicKey := TAccountComp.AccountKey2RawString(TWallet.Keys.Key[i].AccountKey);
end else mpk := mpk_Random;

if cbDownloadNewCheckpoint.Checked then begin
Expand All @@ -120,15 +120,15 @@ procedure TFRMPascalCoinWalletConfig.bbOkClick(Sender: TObject);
end else TSettings.AllowDownloadNewCheckpointIfOlderThan := False;

TSettings.MinerPrivateKeyType := mpk;
TSettings.MinerServerRpcActive := cbJSONRPCMinerServerActive.Checked;
TSettings.MinerServerRpcPort := udJSONRPCMinerServerPort.Position;
TSettings.JsonRpcMinerServerActive := cbJSONRPCMinerServerActive.Checked;
TSettings.JsonRpcMinerServerPort := udJSONRPCMinerServerPort.Position;
TSettings.SaveLogFiles := cbSaveLogFiles.Checked;
TSettings.ShowLogs := cbShowLogs.Checked;
TSettings.SaveDebugLogs := cbSaveDebugLogs.Checked;
TSettings.MinerName := ebMinerName.Text;
TSettings.ShowModalMessages := cbShowModalMessages.Checked;
TSettings.RpcPortEnabled := cbJSONRPCPortEnabled.Checked;
TSettings.RpcAllowedIPs := ebJSONRPCAllowedIPs.Text;
TSettings.JsonRpcPortEnabled := cbJSONRPCPortEnabled.Checked;
TSettings.JsonRpcAllowedIPs := ebJSONRPCAllowedIPs.Text;
TSettings.Save;
ModalResult := MrOk;
end;
Expand Down Expand Up @@ -199,7 +199,7 @@ procedure TFRMPascalCoinWalletConfig.RefreshUI;
Try
udInternetServerPort.Position := TSettings.InternetServerPort;
ebDefaultFee.Text := TAccountComp.FormatMoney(TSettings.DefaultFee);
cbJSONRPCMinerServerActive.Checked := TSettings.MinerServerRpcActive;
cbJSONRPCMinerServerActive.Checked := TSettings.JsonRpcMinerServerActive;
case TSettings.MinerPrivateKeyType of
mpk_NewEachTime : rbGenerateANewPrivateKeyEachBlock.Checked := true;
mpk_Random : rbUseARandomKey.Checked := true;
Expand All @@ -212,9 +212,9 @@ procedure TFRMPascalCoinWalletConfig.RefreshUI;
cbSaveDebugLogs.Checked := TSettings.SaveDebugLogs;
ebMinerName.Text := TSettings.MinerName;
cbShowModalMessages.Checked := TSettings.ShowModalMessages;
udJSONRPCMinerServerPort.Position := TSettings.MinerServerRpcPort;
cbJSONRPCPortEnabled.Checked := TSettings.RpcPortEnabled;
ebJSONRPCAllowedIPs.Text := TSettings.RpcAllowedIPs;
udJSONRPCMinerServerPort.Position := TSettings.JsonRpcMinerServerPort;
cbJSONRPCPortEnabled.Checked := TSettings.JsonRpcPortEnabled;
ebJSONRPCAllowedIPs.Text := TSettings.JsonRpcAllowedIPs;
cbDownloadNewCheckpoint.Checked := TSettings.AllowDownloadNewCheckpointIfOlderThan;
ebMinFutureBlocksToDownloadNewSafebox.Text := IntToStr(TSettings.MinFutureBlocksToDownloadNewSafebox);
Except
Expand Down Expand Up @@ -249,7 +249,7 @@ procedure TFRMPascalCoinWalletConfig.RefreshUI_WalletAspect;
end;
end;
cbPrivateKeyToMine.Sorted := true;
raw := TSettings.MinerSelectedPrivateKey;
raw := TSettings.MinerSelectedPublicKey;
iselected := TWallet.Keys.IndexOfAccountKey(TAccountComp.RawString2Accountkey(raw));
if iselected >= 0 then begin
iselected := cbPrivateKeyToMine.Items.IndexOfObject(TObject(iselected));
Expand Down
6 changes: 3 additions & 3 deletions src/gui-experimental/UFRMPayloadDecoder.pas
Original file line number Diff line number Diff line change
Expand Up @@ -150,9 +150,9 @@ procedure TFRMPayloadDecoder.DoFind(Const OpHash : String);
raise Exception.Create('Invalid OPHASH');
end;
Case TNode.Node.FindNOperation(nBlock,nAccount,nN_Operation,opr) of
invalid_params : raise Exception.Create(Format('Not a valid OpHash searching at Block:%d Account:%d N_Operation:%d',[nBlock,nAccount,nN_Operation]));
blockchain_block_not_found : raise Exception.Create('Your blockchain file does not contain all blocks to find');
found : ;
OpHash_invalid_params : raise Exception.Create(Format('Not a valid OpHash searching at Block:%d Account:%d N_Operation:%d',[nBlock,nAccount,nN_Operation]));
OpHash_block_not_found : raise Exception.Create('Your blockchain file does not contain all blocks to find');
OpHash_found : ;
else raise Exception.Create('ERROR DEV 20171120-6');
end;
If (TPCOperation.EqualOperationHashes(opr.OperationHash,r)) Or
Expand Down
4 changes: 2 additions & 2 deletions src/gui-experimental/UUserInterface.pas
Original file line number Diff line number Diff line change
Expand Up @@ -372,8 +372,8 @@ class procedure TUserInterface.StartApplication(mainForm : TForm);
// Start RPC server
FRPCServer := TRPCServer.Create;
FRPCServer.WalletKeys := TWallet.Keys;
FRPCServer.Active := TSettings.RpcPortEnabled;
FRPCServer.ValidIPs := TSettings.RpcAllowedIPs;
FRPCServer.Active := TSettings.JsonRpcPortEnabled;
FRPCServer.ValidIPs := TSettings.JsonRpcAllowedIPs;
TWallet.Keys.SafeBox := FNode.Bank.SafeBox;

// Initialise Database
Expand Down