File tree Expand file tree Collapse file tree 2 files changed +2
-2
lines changed Expand file tree Collapse file tree 2 files changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -139,7 +139,7 @@ def run_test (self):
139
139
# Address + Private key + !watchonly
140
140
print ("Should import an address with private key" )
141
141
address = self .nodes [0 ].validateaddress (self .nodes [0 ].getnewaddress ())
142
- timestamp = self .nodes [1 ].getblock (self .nodes [1 ].getbestblockhash ())['time ' ]
142
+ timestamp = self .nodes [1 ].getblock (self .nodes [1 ].getbestblockhash ())['mediantime ' ]
143
143
result = self .nodes [1 ].importmulti ([{
144
144
"scriptPubKey" : {
145
145
"address" : address ['address' ]
Original file line number Diff line number Diff line change @@ -1034,7 +1034,7 @@ UniValue importmulti(const JSONRPCRequest& mainRequest)
1034
1034
EnsureWalletIsUnlocked ();
1035
1035
1036
1036
// Verify all timestamps are present before importing any keys.
1037
- const int64_t now = chainActive.Tip () ? chainActive.Tip ()->GetBlockTime () : 0 ;
1037
+ const int64_t now = chainActive.Tip () ? chainActive.Tip ()->GetMedianTimePast () : 0 ;
1038
1038
for (const UniValue& data : requests.getValues ()) {
1039
1039
GetImportTimestamp (data, now);
1040
1040
}
You can’t perform that action at this time.
0 commit comments